Mail Archives: djgpp/2000/11/09/07:45:38
In a burst of inspiration, "Daniel Taupin" <taupin AT lps DOT u-psud DOT fr> wrote
this on <3A08062D DOT 1A866F04 AT lps DOT u-psud DOT fr>:
Aren't there unix2dos and dos2unix programs available for Linux? I dimly
remeber those from my HP-UX days. They're filters, so usage won't be
exactly the same as dtou/utod though.
Alternatively, use recode. Version 3.5 and above support 'surfaces',
which will do exactly what we want.
recode /data../cr-lf your-file-here
does exactly what utod does, while
recode /cr-lf../data your-file-here
is a viable replacement for dtou.
Additionally, recode can also act like a filter.
RPMs for recode are available as part of the libc6 contribs, so there
should be no problem getting it (or you can just get the sources from
ftp.gnu.org and compile it yourself).
In a pinch, you could use tr -d '\r' for dtou, but that would kill CR's
that occur in the middle of a line.
--
Tim Van Holder - Falcon Software NV
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Fight spam - go to http://www.politik-digital.de/spam/
- Raw text -