Easiest to explain with some code:
body=''
NEWLINE=$'\n'
for name in $names # don't worry about the names array
do
body+="$name ${NEWLINE}"
done
The output is something like this:
Joe Michael Tony Peter
Why isn't it like this?
Joe
Michael
Tony
Peter
This should work, as the newline is wrapped in single quotes, but it is ignored.
Any ideas?
Thanks