I am trying to append a new line using
sed, it works only when I add the new line like this:
echo "sometextutf8_filesystemmmmm" | sed -r "/utf8_filesystem/a \\\n# Passive mode"
sometextutf8_filesystemmmmm # Passive mode
One or two back slashes do not work!
\n or two
\\n back slashes I just get this output:
sometextutf8_filesystemmmmm n# Passive mode
without any new line.
Even though, it works properly without having three backslashes with substitution:
echo "sometextutf8_filesystemmmmm" | sed -r "s/utf8_filesystem/\n# Passive mode/"
sometext # Passive modemmmm
Could some one explain that behavior?