title: How to handle non-timeout exception of a script being run with timeout?
body: <p>I am running a command. In case of failure part after <code>||</code> would be executed. It would also be executed in case of timeout.</p>
  
  <pre><code>$ timeout 5 script.sh || { echo "Would execute if timeout or script failure"; }
  </code></pre>
  
  <p>How can I handle timeout error and script error separately?</p>
  
  <pre><code>$ timeout 5 script.sh ??? { echo "Timeout is fine, but this is printed only if script.sh returns an error"; }
  </code></pre>