[Chicago-talk] Replacing consecutive newlines with a single newline

tiger peng tigerpeng2001 at yahoo.com
Sat Sep 27 05:45:53 PDT 2008

Vijay>     perl -0777 -pi -e 's/^SQL>//mg; s/\n{2,}/\n\n/g' inputfile
Vijay>     cat inputfile | mailx ....

Why do people use a useless cat?

I think they are Perlists from Windows' world, who should read some books about UNIX, such as Learning the UNIX Operating System, UNIX Power Tools, etc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20080927/e36889d7/attachment.html>

More information about the Chicago-talk mailing list