From 301ee3e63129891f2a6661fa8f1964e847edacca Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 11 Oct 2016 01:35:46 +0300 Subject: bash.md: more examples --- bash.md | 12 +++++++----- 1 file 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. -- cgit v1.2.3