Issue
How do I print a newline? This merely prints \n
:
$ echo -e "Hello,\nWorld!"
Hello,\nWorld!
Solution
Use printf
instead:
printf "hello\nworld\n"
printf
behaves more consistently across different environments than echo
.
Answered By - sth Answer Checked By - Terry (WPSolving Volunteer)