diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-11 01:35:46 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-11 01:35:46 +0300 |
commit | 301ee3e63129891f2a6661fa8f1964e847edacca (patch) | |
tree | 8ffdf28a4452f656bce49d3ce8f1d47cb1f59d82 | |
parent | bash.md: update (diff) | |
download | notes-301ee3e63129891f2a6661fa8f1964e847edacca.tar.gz notes-301ee3e63129891f2a6661fa8f1964e847edacca.zip |
bash.md: more examples
Diffstat (limited to '')
-rw-r--r-- | bash.md | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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. |