Skip to content

Instantly share code, notes, and snippets.

@tankywoo
Created December 13, 2012 06:07
Show Gist options
  • 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