I'm a bit new to Bash programming, but I was curious during my learning so I wanted to ask what is the logic (or reason) behind as to why:
#/bin/sh
ITERS="1 2 3 4"
for i in $ITERS;
do
echo hi
done
echo
s hi 4 times, while
#/bin/sh
for i in "1 2 3 4";
do
echo hi
done
Only echo
s it once? And how can I achieve the above behaviour without declaring a variable?