sed help: matching and replacing a literal "\n" (not the newline)

bash, linux, newline, pattern-matching, sed

Solution

Can you please try this

sed -i 's/\\n/\n/g' input_filename

Problem

i have a file which contains several instances of \n. i would like to replace them with actual newlines, but sed doesn't recognize the \n. i tried ``` sed -r -e 's/\n/\n/' sed -r -e 's/\\n/\n/' sed -r -e 's/[\n]/\n/' ``` and many other ways of escaping it. is sed able to recognize a literal \n? if so, how? is there another program that can read the file interpreting the \n's as real newlines?

Original source

Related problems