$$
is the process ID (PID) of the script itself.$!
gives the process id of the most recently executed background process.$?
Stores the exit value of the last command that was executed.$#
is the special parameter in which bash gives the number of positional parameter in decimal.$@
Stores all the arguments that were entered on the command line, individually quoted ("$1" "$2" ...).$*
Stores all the arguments that were entered on the command line ($1 $2 ...).$_
The underscore variable is set at shell startup and contains the absolute file name of the shell or script being executed as passed in the argument list.- https://javarevisited.blogspot.com/2011/06/special-bash-parameters-in-script-linux.html
- https://devhints.io/bash
- https://www.tecmint.com/useful-tips-for-writing-bash-scripts-in-linux/
Created
January 11, 2021 22:42
-
-
Save royki/456dac98993879a0179dbc6a981be2c3 to your computer and use it in GitHub Desktop.
Bash Tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment