Add bash $_ last argument of the previous command

This commit is contained in:
Alexander Berezovsky 2020-02-20 12:11:57 -08:00 committed by GitHub
parent b5cd93a09f
commit d0da7addd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

13
bash.md
View File

@ -327,12 +327,13 @@ fi
### Arguments ### Arguments
| Expression | Description | | Expression | Description |
| --- | --- | | --- | --- |
| `$#` | Number of arguments | | `$#` | Number of arguments |
| `$*` | All arguments | | `$*` | All arguments |
| `$@` | All arguments, starting from first | | `$@` | All arguments, starting from first |
| `$1` | First argument | | `$1` | First argument |
| `$_` | Last argument 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).