I want to use a list as parameter to a for-loop; but with double quotes, the list isn't understood as a list, and without quotes, the wildcards are evaluated to filenames.
A="a* b*"
for ex in "$A"; do
echo "$ex";
done
for ex in $A; do
echo "$ex";
done
The first one prints:
a* b*
The latter prints:
a.txt
b.txt
I want:
a*
b*
How can I make this work?