title: Error trapping with unzip?
body: <p>Occasionally, we receive ZIP files from our suppliers that are seemingly corrupted. Attempting to list the contents of a ZIP will trigger an error like this:</p>
  
  <pre><code>    $&gt;unzip -qql JABL_VER_20120808_165910.zip
  unzip:  cannot find or open JABL_VER_20120808_165910.zip, JABL_VER_20120808_165910.zip.zip or JABL_VER_20120808_165910.zip.ZIP.
  </code></pre>
  
  <p>I did a quick read of the unzip man page and coded that snippet to trap the above error</p>
  
  <pre><code>EXIT=`echo $?`
  case $EXIT in
  &gt; 0-1) echo "Unzip Complete.";;
  &gt; *) echo "Unzip Failed.";;
  &gt; esac
  $&gt;Unzip Failed.
  </code></pre>
  
  <p>It seems to work. However, there are cases like this one where the error is different:</p>
  
  <pre><code>$&gt;unzip -qql JABL_VER_20120808_175915.zip
    End-of-central-directory signature not found.  Either this file is not
    a zipfile, or it constitutes one disk of a multi-part archive.  In the
    latter case the central directory and zipfile comment will be found on
    the last disk(s) of this archive.
  unzip:  cannot find zipfile directory in one of JABL_VER_20120808_175915.zip or
          JABL_VER_20120808_175915.zip.zip, and cannot find JABL_VER_20120808_175915.zip.ZIP, period.
  </code></pre>
  
  <p>Is there a "surefire" way to trap errors like these? </p>
  
  <p>PS: Not sure if matters but the ZIP files are generated on MS Windows ; We use Red Hat.</p>