This is an old revision of the document!
Command | Function |
---|---|
#!/bin/bash or #!/bin/sh | shebang |
VAR=var | set VAR to var |
$VAR | inserts var whereever $VAR is placed |
case - esac | inserts case |
if [ “var” == “var” ]; then fi | inserts if |
Running your script prompts interpreter error
Open your script with vi and execute the following
:set fileformat=unix
Running your script requires more rights
Make your script executable with the following command
chmod +x [scriptname].sh
Discussion