title: How to put time limit in bash
body: <p>I'm creating a simple quiz game in bash. I want to run the question with a certain time limit. How to do that? TIA</p>
  
  <p>I tried using this command:</p>
  
  <pre><code>sleep 2m &amp;&amp; kill $$ &amp; 
  </code></pre>
  
  <p>but it terminates the whole script.
  Also: I want to display a "times up" phrase</p>