Created
December 22, 2015 17:21
-
-
Save nhed/d36ea500986d8fb6211c to your computer and use it in GitHub Desktop.
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
# Test for when expression has GLOB characters | |
$ ls -l | |
total 8 | |
-rw-r--r-- 1 nhed wheel 0 Dec 21 19:29 a | |
-rw-r--r-- 1 nhed wheel 0 Dec 21 19:29 b | |
-rw-r--r-- 1 nhed wheel 0 Dec 21 19:29 c | |
-rw-r--r-- 1 nhed wheel 0 Dec 21 19:29 d | |
-rw-r--r-- 1 nhed wheel 2 Dec 21 19:30 x.txt | |
$ cat x.txt | |
* | |
$ IFS=$'\r\n' GLOBIGNORE='*' command eval 'XYZ=($(cat x.txt))' | |
$ echo "${XYZ[0]}" | |
* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment