Quote:
Originally Posted by Disillusionist
or directly from the command line:
sed 's/^M$//' origfile > newfile
|
I just learned something with that Ctl-v trick! Thanks
If you don't like dealing with the control characters and you simply want to strip out all carriage returns (whether or not they immediately precede a newline) you can also:
Code:
cat origfile | tr -d "\r" > newfile
As far as
unix2dos/
dos2unix are concerned, I just looked around at the versions I had and discovered those files on my Ubuntu system are actually symlinks to
todos/
fromdos, which appear to be by a different author (and lower revision numbers). So you could also check out that package (probably have to compile it yourself) and see if you have any better luck.