title: How to catch timeout/errors in a CURL shell script?
body: <p>I want to issue a cURL GET request to a URL and based on the return HTTP code decide whether to do something with the returned HTTP data.</p>
  
  <p>For example, if the HTTP code for a certain url request through cURL is valid (not timed out or error), then keep the returned data from the request somewhere in my system.</p>
  
  <p>How can I actually 'catch' the returned HTTP code (or timeout) and do the decision based on that?</p>