[Chicago-talk] removing line from file.

Pete Krawczyk mongers at bsod.net
Wed Mar 9 11:18:34 PST 2005

Subject: Re: [Chicago-talk] removing line from file.
From: Andy_Bach at wiwb.uscourts.gov
Date: Wed, 9 Mar 2005 13:17:28 -0600

}perl -ne 'next if 1 .. 4; print'  file > beheaded_file

Or, to do it in place:

perl -ni.bak -e 'print unless 1..4' file1 file2 file3

The .bak can be changed or eliminated if you don't want to save a copy of 
the file as filename.bak.

-Pete K
Pete Krawczyk
  mongers at bsod dot net

More information about the Chicago-talk mailing list