title: accessing ERRORLEVEL from bash script
body: <p>I have an application that only works properly when called from a windows command prompt. Something to do with the input/output streams.</p>
  
  <p>So I can call it from a bash script by passing it as an argument to cmd.</p>
  
  <p>cmd /c "badapp"   </p>
  
  <p>This works fine - but occasionally badapp fails with network problems - and I get no feedback. Is there anyway to check the ERRORLEVEl from the bash script - or see the output from badapp on the terminal running the bash script? </p>