I want to run a for loop for all strings in a variable (one by one). When I echo my variable it is like this
A=(curl -s 'localhost:9200/something)
echo "$A"
emits:
sss
ddd
fff
ggg
hhh
My for loop is like this:
for i in "${A[@]}"; do
echo "$i"
echo test
done
But loop just run one time and print all data, instead of putting test
after each item:
sss
ddd
fff
ggg
hhh
test