title: Stop on first error
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2870992/automatic-exit-from-bash-shell-script-on-error">Automatic exit from bash shell script on error</a>  </p>
  </blockquote>
  
  
  
  <p>How can I have bash stop on the first command failure, without putting stuff like this all through my code?</p>
  
  <pre><code>some_prog || exit 1
  some_other_prog || exit 1
  </code></pre>