diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-25 22:57:34 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-25 22:57:34 -0500 |
commit | 47324331076bd3427c2781802e21f8f546b082b1 (patch) | |
tree | 301ad16b05991d689c8e9103c7f9fd885d5f255f | |
parent | 9b995abc6123a088aa8c5575f46e25f1feae3a94 (diff) |
bash-arrays: add a work-around for appending in Bash 3.1
-rw-r--r-- | public/bash-arrays.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public/bash-arrays.md b/public/bash-arrays.md index e1290ce..e5e0a9d 100644 --- a/public/bash-arrays.md +++ b/public/bash-arrays.md @@ -410,6 +410,11 @@ Everything here works all the way back in bash-2.0 (1996), with the following exceptions: * The `+=` operator wasn't added until Bash 3.1. + + * As a work-around, use + <code>array[${#array[*]}]=<var>word</var></code> to append a + single element. + * Accessing subset arrays of the arguments array is inconsistent if <var>pos</var>=0 in <code>${@:<var>pos</var>:<var>len</var>}</code>. |