Created
April 8, 2013 14:39
-
-
Save yamatt/5337280 to your computer and use it in GitHub Desktop.
Sometimes (quite often) I hate bash. This is mostly an issue if you want spaces in your directory path.
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
mkdir gubbins | |
touch gubbin{0..9}.file | |
ls gubbins/ # responds as you would expect | |
ls gubbins/* # responds as you would expect | |
ls gubbins/*.file # responds as you would expect | |
ls "gubbins/*.file" # no such file or directory | |
ls 'gubbins/*.file' # no such file or directory | |
ls "gubbins/"*".file" # works! damnit. | |
# So you have to unescape the directory path to search for a file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment