summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-11 01:35:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-11 01:35:46 +0300
commit301ee3e63129891f2a6661fa8f1964e847edacca (patch)
tree8ffdf28a4452f656bce49d3ce8f1d47cb1f59d82
parentbash.md: update (diff)
downloadnotes-301ee3e63129891f2a6661fa8f1964e847edacca.tar.gz
notes-301ee3e63129891f2a6661fa8f1964e847edacca.zip
bash.md: more examples
-rw-r--r--bash.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/bash.md b/bash.md
index e1bd377..628bfa8 100644
--- a/bash.md
+++ b/bash.md
@@ -24,8 +24,10 @@ GNU `bash`
#### Don't
- unset -v arr[x] # May break due to globbing.
- unset -v arr[$i] # The same as above + possibly a pair of quotes is missing.
- unset -v 'arr["x"]' # Doesn't work for some reason.
- unset -v 'arr["]"]' # The same as above; just highlighting the problem with funny characters in array indices.
- # An insightful discussion: https://lists.gnu.org/archive/html/help-bash/2016-09/msg00020.html.
+ unset -v arr[x] # May break due to globbing.
+ unset -v arr[$i] # The same as above + a possible problem with quotation.
+ unset -v 'arr["x"]' # Doesn't work for some reason.
+ unset -v 'arr["]"]' # The same as above; just highlighting the problem with funny characters in array indices.
+ unset -v 'arr["$i"]' # Also rejected.
+
+ # An insightful discussion on the topic: https://lists.gnu.org/archive/html/help-bash/2016-09/msg00020.html.