title: tail and grep log and mail (linux)
body: <p>i want to tail log file with grep and sent it via mail
  like:</p>
  
  <pre><code>tail -f /var/log/foo.log | grep error | mail -s subject name@example.com
  </code></pre>
  
  <p>how can i do this?</p>