Last active
October 3, 2015 22:44
-
-
Save joshenders/5a27f7808dbcdf13f491 to your computer and use it in GitHub Desktop.
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
$ var=$(echo ' ab') | |
$ echo $var | |
ab | |
$ echo $var | xxd | |
0000000: 6162 0a ab. | |
$ if [[ "$var" =~ ^a ]]; then echo match; else echo not match; fi | |
not match | |
$ var=$(echo 'ab') | |
$ echo $var | xxd | |
0000000: 6162 0a ab. | |
$ if [[ "$var" =~ ^a ]]; then echo match; else echo not match; fi | |
match |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment