At 18:52 2005-07-14 +0200, Michelle Konzack wrote:
Am 2005-07-14 17:59:30, schrieb vincent:
cat /dos/filename | tr -d '\15\32' > /new/unix/filename
I've done that with all my .procmail and rc.files and everything is working
perfectly now, thanks for the hint !! :)
What about the tool 'dos2unix' or 'fromdos' from
the Package "sysutils" ? - It is much easier.
dos2unix <filename>
Well, tr is more commonly found on more systems.
tr -d '\15\32' < /dos/filename > /new/unix/filename
A quick check of several BSD boxes (managed at different sites) shows no
sign of dos2unix (or fromdos) on them. tr however is ever present. Makes
it a pretty good bet to direct someone to use the above command to fix a
buggered file. Generally speaking, those who have special embedded
seqences probably are aware of the CR line ending problem when parsing a
unix file....
FTR, I don't recall it being mentioned, but (octal) \32 is ctrl-z, which is
an old-style (OLD old style) DOS EOF marker.
I have an old utility I wrote ages ago called "XCRLF" which translates
CR/LF line endings between DOS/UNIX/MAC (the mac used exclusively CRs for
end of line). I still run this on my PC here and there when manipulating
log files and whatnot. One thing it does is auto-senses what it is
converting from, based on the first encountered line ending sequence,
though this might be undesireable for some people (say with a file with
just a few buggered lines).
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail