I have something like this:
FILES=()
for i in *.map
do
FILES+=($i)
done
find /var/candy -name "chocolate_[0-9]" | while read snack
do
FILES+=($snack)
done
for file in ../out/amsterdam/apples/{system.map,vmlinux}
do
FILES+=($file)
done
But the array ends up only containing ../out/amsterdam/apples/system.map
and ../out/amsterdam/apples/vmlinux
. What happened to the other values? I know they exist in those loops because I echoed to make sure the variables contained something.