From 8646bb2c891efa4c553d524ed810a31043fca5f1 Mon Sep 17 00:00:00 2001 From: Matilde Bravo <56790511+matildeopbravo@users.noreply.github.com> Date: Thu, 18 Feb 2021 06:56:44 +0000 Subject: [PATCH] Updated description for arguments section (#1620) --- bash.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bash.md b/bash.md index 9452dba9e0..1943cb1309 100644 --- a/bash.md +++ b/bash.md @@ -343,13 +343,16 @@ fi ### Arguments -| Expression | Description | -| --- | --- | -| `$#` | Number of arguments | -| `$*` | All arguments | -| `$@` | All arguments, starting from first | -| `$1` | First argument | -| `$_` | Last argument of the previous command | +| Expression | Description | +| --- | --- | +| `$#` | Number of arguments | +| `$*` | All postional arguments (as a single word) | +| `$@` | All postitional arguments (as separate strings) | +| `$1` | First argument | +| `$_` | Last argument of the previous command | + +**Note**: `$@` and `$*` must be quoted in order to perform as described. +Otherwise, they do exactly the same thing (arguments as separate strings). See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).