I don't understand what the shopt xpg_echo changes if it is activated or deactivated.
In the manual:
xpg_echo
If set, the echo builtin expands backslash-escape
sequences by default.
I tried to activate/deactivate xpg_echo, but echo has the same behaviour.
It determines if echo will process escape-sequences like \n:
$ shopt -u xpg_echo # Disable xpg_echo
$ echo "Hello\nworld"
Hello\nworld
$ shopt -s xpg_echo # Enable xpg_echo
$ echo "Hello\nworld"
Hello
world
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