Re: Text files
> I must be missing something obvious, but other than writing a filter in C or
> using an app like fte, is there an easy way to convert mac/pc->text files to
> unix format, especially CR/LF translation?
>
Install the sysutils package, comes with "dos2unix".
Or try :
cat file | sed /s/^M//g > newfile.txt
Alternatively :
cat file | tr -d '^M' > newfile.txt
If you use bash as your shell the above ^M is typed on the command line
as ctrl-v then ctrl-m to literally insert the ^M character.
There's probably hundreds of ways with available shell tools :)
What Mac program are you using that's inserting dos/^M? Last time
I used a Mac they were using the same format as Unix (and Amiga :))
Reply to:
- Follow-Ups:
- Re: Text files
- From: Michael Schmitz <schmitz@mail.biophys.uni-duesseldorf.de>
- References:
- Text files
- From: "Nigel Pegram" <npegram@ozemail.com.au>