About "format". Generally shell scripts start with line
#!/bin/sh
The #! is called shebang (for some reason), and it means to kernel that
- the file is a script
- the script is interpreted by program that is after the shebang
You run the script either
- by giving its name: name-of-the-script
- by giving its path : /dir/subdir/name-of-the-script
- by giving source command to your current shell (either . or source, depending on the shell you are using)
The first case works only if the script is on place named in $PATH environment file. The first and second case work only if you have set the execution bit on the file (using command "chmod u+x the-file-name").
But, if you meant the extension by the shell script, there is no restriction, but normally the script is named either without extension ("myfinescript") or with extension that reminds that it is shell script ("myanotherscript.sh")