http://qs321.pair.com?node_id=198914


in reply to Save all but line 32!


Here is another way:     perl -i -pe '$_=$}if$.==32' file

Update: To handle multiple files it needs to be a little longer:     perl -i -pe '$_=$}if$.==32;$.=$[if+eof' file1 file2 ...

But this is probably the cleanest way:     awk 'FNR != 32' file1 file2 ...

--
John.