diff options
Diffstat (limited to 'arraytest.sh')
| -rwxr-xr-x | arraytest.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arraytest.sh b/arraytest.sh new file mode 100755 index 0000000..1a5e866 --- /dev/null +++ b/arraytest.sh @@ -0,0 +1,11 @@ +#! /bin/bash +# testing array assignment and quoting. + +declare -a arr=("one" "two" "and three" nakedFOUR) + +for x in "${arr[@]}" +do + echo "With quotes \"\$x\"" :"$x": + echo " no quotes \$x" :$x: + echo " curly braces \${x}" :${x}: +done |
