Working with printf in a bash script, adding no spaces after \"\\n\" does not create a newline, whereas adding a space creates a newline, e. g.:
printf
\"\\n\"
Works ok if you add "\r"
$ nl=`printf "\n\r"` && echo "1${nl}2" 1 2
$ printf -v NewLine "\n" $ echo -e "Firstline${NewLine}Lastline" Firstline Lastline $ echo "Firstline${NewLine}Lastline" Firstline Lastline