Skip to content

Instantly share code, notes, and snippets.

@yamatt
Created April 8, 2013 14:39
Show Gist options
  • Save yamatt/5337280 to your computer and use it in GitHub Desktop.
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.
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