caract="A B"
map="bbb"
for line in $caract
do
RES_QUERY=$caract" "$map$'\n'$RES_QUERY
done
echo $RES_QUERY
I get :
A B bbb A B bbb
instead of :
A B bbb
A B bbb
caract="A B"
map="bbb"
for line in $caract
do
RES_QUERY=$caract" "$map$'\n'$RES_QUERY
done
echo $RES_QUERY
I get :
A B bbb A B bbb
instead of :
A B bbb
A B bbb
Please try changing echo $RES_QUERY
to echo "$RES_QUERY"
to keep the new lines printed on screen.