Fair enough. However, I have to admit that I have never ever needed to pass a string to a Linux command that was meant to have a newline inside and not represented by \n
. If the situation arose, I would have just did command "`echo -e "a\nb"`"
in the terminal (which works as it can be confirmed by replacing command
by echo
without the -e
).