Inserting new line in echo command
Out of curiosity and the perfectionist in me, I “had” to print a line of text in the output inside a BASH shell script. I didn’t really want to split them into multiple echo statements since it’s a waste of space and actually harder to read for me. The first thing I tried was:
> echo “Line1\nLine2″ # Line1\nLine2
That clearly didn’t work out so well… so I thought maybe my Mac (OS X 10.5.7) likes ‘\r\n’ more:
