From 47324331076bd3427c2781802e21f8f546b082b1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 25 Jan 2014 22:57:34 -0500 Subject: bash-arrays: add a work-around for appending in Bash 3.1 --- public/bash-arrays.md | 5 +++++ 1 file changed, 5 insertions(+) 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 + array[${#array[*]}]=word to append a + single element. + * Accessing subset arrays of the arguments array is inconsistent if pos=0 in ${@:pos:len}. -- cgit v1.2.3