Add special parameter $_ to bash cheatsheet (#1736)
This commit is contained in:
parent
3bf1169205
commit
b28b6527f3
13
bash.md
13
bash.md
|
@ -754,12 +754,13 @@ read -n 1 ans # Just one character
|
||||||
|
|
||||||
### Special variables
|
### Special variables
|
||||||
|
|
||||||
| Expression | Description |
|
| Expression | Description |
|
||||||
| ---------- | ---------------------------- |
|
| ---------- | -------------------------------------- |
|
||||||
| `$?` | Exit status of last task |
|
| `$?` | Exit status of last task |
|
||||||
| `$!` | PID of last background task |
|
| `$!` | PID of last background task |
|
||||||
| `$$` | PID of shell |
|
| `$$` | PID of shell |
|
||||||
| `$0` | Filename of the shell script |
|
| `$0` | Filename of the shell script |
|
||||||
|
| `$_` | Last argrument of the previous command |
|
||||||
|
|
||||||
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
|
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue