Sometime Today, LGKA cobbled together some glyphs to say:
On 06/29/06 11:27, Mangesh V Rakhunde wrote:
How can I delete last line from all files from a Directory
[snip]
I am sure the command "sed"(or may be "awk") can somehow do this in just one line .. so wait till a sed guru bangs the hell out of me .. :-)
well, you asked for it :P
sed -ne '$q;p' < file.txt > file.txt.bak && mv file.txt.bak file.txt
Philip