Hi, I have a text file test.dat which is generated by:
echo "one\r\ntwo\nthree\r\nfour" > test.dat
in vi editor, it looks like this:
Now what I want is to replace all the occurance of "\r\n" by a space " ". Which means I want my output to be:
I tried the sed command like this:
sed 's/\r\n/ /g' test.dat > test2.dat
but it doesn't work at all. test2.dat is the same as test.dat.
May I know what is the correct way of doing this? It doesn't have to be sed, so long as it works I dont mind its perl or awk or whatever.
Thanks a lot in advance.