In case it helps anyone, I was searching for the opposite of this question: to replace literal '\'n in a string with newline. I managed to solve it with sed like this:
_s="foo\nbar\n"echo $_s | sed 's/\\n/\n/g'
In case it helps anyone, I was searching for the opposite of this question: to replace literal '\'n in a string with newline. I managed to solve it with sed like this:
_s="foo\nbar\n"echo $_s | sed 's/\\n/\n/g'