summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/bash-style.cli8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/bash-style.cli b/doc/bash-style.cli
index 9d44374..09f802e 100644
--- a/doc/bash-style.cli
+++ b/doc/bash-style.cli
@@ -257,6 +257,14 @@ Instead always write:
cmd \"$@\"
\
+Also understand the difference between \c{@} and \c{*} expansion:
+
+\
+files=('one' '2 two' 'three')
+echo \"files: ${files[@]}\" # $1='files: one', $2='2 two', $3='three'
+echo \"files: ${files[*]}\" # $1='files: one 2 two three'
+\
+
\h1#trap|Trap|
Our scripts use the error trap to automatically terminate the script in case