katilp / sandbox

My trials
0 stars 0 forks source link

notes: add \n to end of line #55

Open katilp opened 2 years ago

katilp commented 2 years ago

https://stackoverflow.com/questions/38672680/replace-newlines-with-literal-n/38674872

$ cat file
a
b
c

$ awk '{printf "%s\\n", $0}' file
a\nb\nc\n$