Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/bin/sh help needed



I have a string in a /bin/sh script.  In that script I have a variable 
with a space-separates list of file widcards, like:
	paths="/etc/r* /var/adm/* /home/dkramer/e*"

I have another script that I want to call from this one, passing these 
wildcards as separate arguments, like:
	dfcheck -s 10 ${paths}

Every combination of single quotes, double quotes, and escaping seems to 
either send it all as one argument, or send it all as separate arguments, 
but each argument is quoted.  The only solution I found, which works but 
is "unsatisfying", is 
	echo "$paths" | xargs dfcheck -s 10

Any ideas?

-------------------------------------------------------------------
DDDD   David Kramer                   http://thekramers.net
DK KD
DKK D  Intelligence is knowing how to build a nuclear bomb.
DK KD  Wisdom is knowing how not to need them.
DDDD                              Shaggy 2 Dope- Insane Clown Posse





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org