sed wydrukuj wszystkie linie oprócz ostatniego

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