The bash echo
command isn't using the escaped characters like "\n" and "\t"
echo "This is test string\nAnd this is next line"
For the above input it displays
This is test string\nAnd this is next line
So how do I print on the next line?
You need echo -e
if you want escaped characters to be expanded:
$ echo -e "This is test string\nAnd this is next line"
This is test string
And this is next line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With