SyntaxFix
Write A Post
Hire A Developer
Questions
var="a b c" for i in $var do p=`echo -e "$p"'\n'$i` done echo "$p"
The solution was simply to protect the inserted newline with a "" during current iteration when variable substitution happens.