title: Deleting last line of a file
body: <p>I want to delete last line of a file on a particular condition. I used sed and cut but they work only on the output stream but I want to do this in the file. Can someone help me?
  Thanks in advance.</p>