SHARE
TWEET

Untitled

a guest Feb 15th, 2014 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bash-4.2$ t=something
  2.  
  3. bash-4.2$ [ $t=="hi" ] ; echo $?
  4. 0
  5.  
  6. bash-4.2$ [ $t == "hi" ] ; echo $?
  7. 1
  8.  
  9. bash-4.2$ [ "foo"=="bar" ] ; echo $?
  10. 0
  11.  
  12. bash-4.2$ [ "foo" == "bar" ] ; echo $?
  13. 1
  14.  
  15. bash-4.2$ (($t=="hi")) ; echo $?
  16. 0
  17.  
  18. bash-4.2$ (("foo"=="bar")) ; echo $?
  19. 0
  20.  
  21. bash-4.2$ ((3==4)) ; echo $?
  22. 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top