[Chicago-talk] removing blank lined header
easyasy2k at gmail.com
Tue Sep 28 18:47:44 CDT 2004
What are you trying to just remove blank lines? Then this would be the best:
perl -n -e 'print unless /^$/'
or, editing in place...
perl -n -i -e 'print unless /^$/'
On Tue, 28 Sep 2004 15:55:28 -0500, andy_bach at wiwb.uscourts.gov
<andy_bach at wiwb.uscourts.gov> wrote:
> This works:
> perl -ne 'print unless 1 .. /\w/ and ! /\w/ ' /tmp/dp.out
> so shouldn't this (it doesn't):
> perl -ne 'print if 1 .. /\w/ or /\w/ '
> perl -ne 'print if ! 1 .. /\w/ or /\w/ '
> never mind - unless anybody has a less logical method.
> Andy Bach, Sys. Mangler
> Internet: andy_bach at wiwb.uscourts.gov
> VOICE: (608) 261-5738 FAX 264-5932
> Contrariwise," continued Tweedledee, "if it was so, it might be, and
> if it were so, it would be; but as it isn't, it ain't. That's logic!"
> -- Lewis Carroll, "Through the Looking Glass"
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
More information about the Chicago-talk