All Questions
3
questions
0
votes
0
answers
16
views
How to append a "/*" to the end of a variable with spaces and glob it? [duplicate]
If I have a directory wibble, the following command does what I want:
WIBBLE=wibble
wc $WIBBLE/*
If I have a directory foo bar, the following command does what I want:
wc foo\ bar/*
But this doesn'...
10
votes
2
answers
9k
views
ls with a wildcard
This works from the terminal:
ls /dev/sda*
I want it in a bash script, using a variable. I tried:
device="a"
ls "/dev/sd"$device"*"
But I get the error: ls: cannot access '/dev/sda*': No such file ...
6
votes
2
answers
8k
views
How to store a path built with wildcards and containing with spaces into a variable
Here's the situation (I'm on a Mac, OS X El Capitan):
# This works:
$ cd /Applications/Adobe\ Illustrator*/Cool\ Extras.localized/en_US/Templates/;
# These do not work:
$ INSTALL_DIR=/Applications/...