Греп всех, кроме последнего

sed \$d	#For grepping all lines of a file except last line
Armandres