[Chicago-talk] removing blank lined header

Leland Johnson 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/ '
> 
> oops.
> perl -ne 'print if ! 1 .. /\w/ or  /\w/ '
> 
> never mind - unless anybody has a less logical method.
> 
> a
> 
> 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
> http://mail.pm.org/mailman/listinfo/chicago-talk
> 



-- 
Leland Johnson
http://protoplasmic.org


More information about the Chicago-talk mailing list