How do I print a newline? This merely prints \n:
\n
echo -e "Hello,\nWorld!"
Output:
Hello,\nWorld!
Use printf instead:
printf
printf 'Hello, \nWorld!\n'
printf behaves more consistently across different environments than echo.
echo