5

Delete last line from the file

view full story
linux-howto

http://unix.stackexchange.com – I use sed to quickly delete lines with specific position as sed '1d' sed '5d' But, what if I want to delete the last line of the file and I don't know the count of lines (I know I can get that using wc and several other tricks). Currently, using a workaround with head and tailcombined with wc to do so. Any quick twists here? (HowTos)