Last active
August 29, 2015 14:18
-
-
Save yu81/a6f9b6d481d6968cf737 to your computer and use it in GitHub Desktop.
シェルスクリプトでの == を認めているのはbashだけ? ref: http://qiita.com/YU81/items/b1bde03c06b45f7d267f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ [ a = b ] && echo true || echo false | |
false | |
$ [ a == a ] && echo true || echo false | |
true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ [ a = b ] && echo true || echo false | |
false | |
$ [ a == a ] && echo true || echo false | |
true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ [ a = b ] && echo true || echo false | |
false | |
$ [ a == a ] && echo true || echo false | |
[: 4: a: unexpected operator | |
false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ [ a = b ] && echo true || echo false | |
false | |
$ [ a == a ] && echo true || echo false | |
[: 4: a: unexpected operator | |
false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment