title: Terminate tail command after timeout
body: <p>I'm capturing <em>stdout</em> (log) in a file using <code>tail -f file_name</code> to save a specific string with <code>grep</code> and <code>sed</code> (to exit the tail) :</p>
  
  <pre><code>tail -f log.txt | sed /'INFO'/q |  grep 'INFO' &gt; info_file.txt
  </code></pre>
  
  <p>This works fine, but I want to terminate the command in case it does not find the pattern (<code>INFO</code>) in the log file after some time</p>
  
  <p>I want something like this (which does not work) to exit the script after a timeout (60sec):</p>
  
  <pre><code>tail -f log.txt | sed /'INFO'/q |  grep 'INFO' | read -t 60
  </code></pre>
  
  <p>Any suggestions?</p>