From 899cb9446ed369efddae4303fe84e99a543bb8fe Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 9 Sep 2013 21:49:12 +1200 Subject: Better syntax for array append --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.markdown') diff --git a/README.markdown b/README.markdown index a7e7aea6..3ae02e61 100644 --- a/README.markdown +++ b/README.markdown @@ -80,7 +80,7 @@ less error-prone `[[` test syntax was introduced. This is why I use older syntax for certain things such as appending items to arrays: ```bash -array[${#array[@]}]=$item +array=("${array[@]}" "$item") ``` Compare this to the much nicer syntax available since 3.1-alpha1, which -- cgit v1.2.3