I'm trying to expand an array in bash:
FILES=(2009q{1..4})
echo ${FILES[@]}
echo ${FILES[@]}.zip
Output is:
2009q1 2009q2 2009q3 2009q4
2009q1 2009q2 2009q3 2009q4.zip
But how can I expand the last line as in echo 2009q{1..4}.zip
expansion, so that the last line looked like:
2009q1.zip 2009q2.zip 2009q3.zip 2009q4.zip
... but using array FILES
?