Delete last line from the file
sedto 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
wcand several other tricks).
Currently, using a workaround with
wcto do so. Any quick twists here?
@Nils I am on 'Red Hat Enterprise Linux Server release 5.5 (Tikanga)'. Can you point for the options for `head` and `tail` you know of on different flavours?