Monday, December 28, 2009

Delete the last line in a text file using sed

sed -i '$d' hobba

-i: to change the file itself, not copy contents to another file or something
$d: delete the last line
hobba: the file name

No comments: