However, this is inefficient for large files since it reads all the way through the file before ignoring the last line.perl -i.bak -ne 'print unless eof' file1 file2 ...
For large files see: Delete the last line of a file.
--
John.
In reply to Re: Delete last record in text file
by jmcnamara
in thread Delete last record in text file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |