Date: Fri, 13 Jun 2003 12:50:32 -0400
From: Hal Burgiss <hal(_at_)burgiss(_dot_)net>
On Fri, Jun 13, 2003 at 04:29:59PM +0000, chrisp(_at_)finger8(_dot_)com wrote:
$ sed 's/^M$//' < crlf > lf
Is this any better than dos2unix command (which would seem much easier
to explain to less experienced users).
--
Hal Burgiss
This depends. I've never used a system that came out of the box
with a dos2unix command, though I've heard of it and seen examples
of its use many times. I would recommend dos2unix for less-
experienced users, and I would consider making a shell script
if this sed usage if you don't have dos2unix. (I just think sed is
much more fun. :P)
$ cat mydos2unix
#!/bin/sh
sed 's/^M$//'
# the end
Then, use the redirection, as I did in the email to which you
responded. Alternately, you can modify the script to have some
degree of error-checking, etc.
Another alternative, of course, is to urge users to edit in UNIX
the text files, rather than in Windows.
Chris
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail