From d0da7addd5028fd07bb6df226dda2bd3e1d3c545 Mon Sep 17 00:00:00 2001 From: Alexander Berezovsky Date: Thu, 20 Feb 2020 12:11:57 -0800 Subject: [PATCH] Add bash $_ last argument of the previous command --- bash.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bash.md b/bash.md index 28ec038df..001186ee6 100644 --- a/bash.md +++ b/bash.md @@ -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).