I'm writing a bash script that will deal with blob data that needs to be written to a file. The data inserted into the blob is separated by newlines. The command line mysql -e select blobfield from datatable > file.txt returns data of the form foo\nbar\nbaz\nmoo.
I would like to write it out to a file that looks like
foo
bar
baz
moo
This obviously looks like a regex job, but how do I replace \n with \n?