title: shell script to trigger a command with every new line in to a file?
body: <p>Is it possible to trigger a command with every new line in to a file?</p>
  
  <p>For example: I have a log file say maillog. I want to get every new entry in to the log file as a mail.</p>
  
  <p>If a new entry like " Mail Sent " added in to maillog file then my script should grep the new entry and send me a mail with the entry(data).</p>
  
  <p>I know its crazy but i want to automate my Linux box with these kind of things.</p>
  
  <p>Regards,</p>