title: Bash detect an error in loop then continue processing
body: <p>I would like to process a list of Homebrew formulas contained in a text file.  If there is an installation error (e.g. already install, bad formula name), I'd like it to write the error, but continue processing.  The <a href="https://github.com/craibuc/brewer" rel="noreferrer">Github project</a>.</p>
  
  <p>What I have so far:</p>
  
  <pre><code>...
  # process list of formulas that have been installed
  for i in $(cat $FILE) ; do
  
      echo "Installing $i ..."
  
      # attempt to install formula; if error write error, process next formula
  
      brew install $i
  
  done
  ...
  </code></pre>
  
  <p>How do I do this?</p>