Skip to content

Instantly share code, notes, and snippets.

@tankywoo
Created December 13, 2012 06:07
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 tankywoo/4274450 to your computer and use it in GitHub Desktop.
Save tankywoo/4274450 to your computer and use it in GitHub Desktop.
一行写出shell判断语句
#!/bin/bash
# Tanky Woo@2012-12-13
[ "$?" -ne "0" ] && { echo "FAIL"; exit 1; } || echo "SUCC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment