echo new line in bash code example
Example 1: newline in echo unix
echo $'hello\nworld'
Example 2: echo new line
echo -e "hello\nworld"
# Output
/*
* hello
* world
*/
echo $'hello\nworld'
echo -e "hello\nworld"
# Output
/*
* hello
* world
*/