Merge pull request #1367 from a-b/patch-1

Add bash $_ last argument of the previous command
This commit is contained in:
Rico Sta. Cruz 2020-02-23 20:32:59 +11:00 committed by GitHub
commit ecf5282f1f
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
| Expression | Description |
| --- | --- |
| `$#` | Number of arguments |
| `$*` | All arguments |
| `$@` | All arguments, starting from first |
| `$1` | First argument |
| Expression | Description |
| --- | --- |
| `$#` | Number of arguments |
| `$*` | All arguments |
| `$@` | All arguments, starting from first |
| `$1` | First argument |
| `$_` | Last argument of the previous command |
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).