in reply to Delete last record in text file


Here is one way:
perl -i.bak -ne 'print unless eof' file1 file2 ...
However, this is inefficient for large files since it reads all the way through the file before ignoring the last line.

For large files see: Delete the last line of a file.

--
John.