RosettaCodeData/Task/Loops-Foreach/UNIX-Shell/loops-foreach-4.sh

5 lines
118 B
Bash
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
set -A collection "first" "second" "third" "fourth" "something else"
for x in "${collection[@]}"; do
echo "$x"
done