Skip to content

Instantly share code, notes, and snippets.

@opqdonut
Created August 14, 2012 12:51
Show Gist options
  • Save opqdonut/3349046 to your computer and use it in GitHub Desktop.
Save opqdonut/3349046 to your computer and use it in GitHub Desktop.
$ foo=""
$ bar="x"
$ if [ -n $bar ]; then echo MOI; else echo HEI; fi
MOI
$ if [ -n $foo ]; then echo MOI; else echo HEI; fi
MOI
$ [ $bar = $foo ]
[: 6: =: argument expected
$ [ "$foo" = "$bar" ]
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment