Skip to content

Instantly share code, notes, and snippets.

@drewr
Created March 19, 2010 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewr/337856 to your computer and use it in GitHub Desktop.
Save drewr/337856 to your computer and use it in GitHub Desktop.
#!/bin/sh
died=`sh die.sh`
case $? in
0) echo success;;
1) echo warn;;
*) echo fail;;
esac
## % sh capture.sh
## warn
#!/bin/sh
echo dying 1
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment