Last active
October 19, 2015 19:51
-
-
Save ormaaj/18b956881b2c8bc493ad to your computer and use it in GitHub Desktop.
Magic test
This file contains 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
#!/bin/bash | |
shopt -s expand_aliases extglob | |
alias \[='x=${BASH_COMMAND#"${BASH_ALIASES[\[]} "} command eval eval \"[[ \$x]\" \#' | |
set -x | |
[ ormaaj == or+([ma])j ] | |
echo "$?" |
This file contains 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='ormaaj == or+([ma])j ]' | |
+ command eval eval '"[[' '$x]"' '#' ormaaj == 'or+([ma])j' ']' | |
+ eval eval '"[[' '$x]"' '#' ormaaj == 'or+([ma])j' ']' | |
++ eval '[[ ormaaj == or+([ma])j ]]' | |
+++ [[ ormaaj == or+([ma])j ]] | |
+ echo 0 | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment