Help with sed
Hi,
I'm hoping someone can help with the correct syntax for sed. I retrieve a log file via a cgi script and the format of the output file is a single line of text several thousand characters long. It has lots of "\n" in the text, but they seem to be strings and not new line characters.
An example of the file contents:
# cat example.txt
one\nninety\nnine\n
I'd like to remove each \n and insert a new line so the output looks like:
one
ninety
nine
I've tried with sed and tr but I can't get either to output correctly.
# sed 's/\\n/\n/g' example.txt
onenninetynninen
# cat example.txt | tr '\\' '\n'
one
nninety
nnine
n
|