how to replace windows carriage return with a space in a ginormous text file
The file size in question is 60 GB 开发者_JS百科(don't ask why). I need to replace the windows carraige return rather quickly. Any one care to share (voodo unix skills welcome)
Edit: I found this stackoverflow question helpful as well, but I think this could be even large for sed to produce a result in time (let's see I will report back)
Try this on a smaller version of the file first to be sure its ok
sed "s/\r//" infile >outfile
You could simply do
cat file | tr '\n' ' '
You can try the following should work:
cat file | tr -d '\015' > file1
精彩评论