-
-
Save ingydotnet/cbcac5bb4c1886fb9606 to your computer and use it in GitHub Desktop.
Bash bug wrt `[[` and quoting?
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
$ x='a\b' | |
$ echo $x | |
a\b | |
$ echo "$x" | |
a\b | |
$ echo $x | hexdump -C | |
00000000 61 5c 62 0a |a\b.| | |
00000004 | |
$ [ $x == $x ] || echo hmmm | |
$ [ "$x" == "$x" ] || echo hmmm | |
$ [[ $x == $x ]] || echo hmmm | |
hmmm | |
$ [[ "$x" == "$x" ]] || echo hmmm | |
$ [[ $x == "$x" ]] || echo hmmm | |
$ [[ "$x" == $x ]] || echo hmmm | |
hmmm | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested on: