[Chicago-talk] removing blank lined header

Steven Lembark lembark at wrkhors.com
Wed Sep 29 00:02:17 CDT 2004


> perl -n -i -e 'print unless /^$/'

what about lines with multiple bits of whitespace (e.g.,
trailing ^M's)?

perl -n -i -e 'print if /\S/' $file;

will print anything with non-whitespace on the line (which
gracefully handles msdog/vms files.

-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
lembark at wrkhors.com                                     1 888 359 3508


More information about the Chicago-talk mailing list