Update 'computing_shell_scripts'
parent
6d2707b517
commit
9b8e844e1b
@ -11,4 +11,16 @@ There are several flavours of Linux shells. Bash is one of the most common.
|
||||
## Bourne-Again SHell (BASH)
|
||||
- [Bash scripting cheatsheet](https://devhints.io/bash)
|
||||
- [30 Bash script examples](https://linuxhint.com/30_bash_script_examples/)
|
||||
- [Bash Scripting Tutorial for beginners](https://linuxconfig.org/bash-scripting-tutorial-for-beginners)
|
||||
- [Bash Scripting Tutorial for beginners](https://linuxconfig.org/bash-scripting-tutorial-for-beginners)
|
||||
|
||||
## variables in a bash script
|
||||
$0 - The name of the Bash script.
|
||||
$1 - $9 - The first 9 arguments to the Bash script. (As mentioned above.)
|
||||
$# - How many arguments were passed to the Bash script.
|
||||
$ - All the arguments supplied to the Bash script.
|
||||
$ - The exit status of the most recently run process.
|
||||
$$ - The process ID of the current script.
|
||||
$USER - The username of the user running the script.
|
||||
$HOSTNAME - The hostname of the machine the script is running on.
|
||||
$SECONDS - The number of seconds since the script was started.
|
||||
$RANDOM - Returns a different random number each time is it referred to.
|
Loading…
Reference in New Issue
Block a user