Hello,

> Why do a lot of bash scripts start with the first line as #!/bin/bash

  It means that the script must be executed by the program #!/bin/bash.
                                                       
> They seem to work just as well without.

  Not if you were using another shell than bash, like csh or tcsh, which uses
different syntax. Try the following :

bash# cat > tmpscript 
# 
export TOTO='hello world'
echo $TOTO
bash# chmod +x ./tmpscript 
bash# tmpscript 
hello world
bash# csh
csh% tmpscript
export: Command not found.
TOTO: Undefined variable.

Reply via email to