topical media & game development

talk show tell print

basic-shell-09-return-codes.sh / sh



  
  DIR=/
  ls DIR > /dev/null
  echo "Return code from [ls DIR] was ?."
  
  DIR=/foobar
  ls DIR > /dev/null 2>&1
  echo "Return code from [ls DIR] was ?."
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.