Syntax Explanation #!/bin/bash Used to tell the operating system the path it should use to interpret the file. bash file.sh Used to execute the script in the terminal. ./file.sh Used to execute the script if it is executable.
&& logical AND operator.
| | logical OR operator.
$# Used to expands the number of arguments passed to the script.
$0 Used to expands to the name of the shell.
$1,
Used to send output to a file.
Used to append output to a file.
; Used to separate multiple commands. < Used to get input from a file. ~ Expands to the home directory. ~/.bashrc Read by every non-login shell. /etc/profile Executed automatically at login.