[CentOS] stupid bash question

Craig White craig.white at ttiltd.com
Wed Aug 15 23:08:34 UTC 2012


Some really good suggestions but unfortunately no dice

On Aug 15, 2012, at 3:22 PM, Larry Martell wrote:

> Run the script with -x to see what's happening. $NAME is probably
> getting expanded. You might have to set noglob.
----
set +o noglob (inside or outside script made no difference
----
On Aug 15, 2012, at 3:45 PM, Steve Thompson wrote:

> The substitution of $NAME is expanding the wild card, giving you a single 
> -name with two arguments. You probably want something like:
> 
> 	NAME="\*.mov"

-----
Definitely agree that it's expanding the glob but this doesn't work
-----
On Aug 15, 2012, at 3:51 PM, Jérémie Dubois-Lacoste wrote:  (and Patrick Welch too)

> I gess you could also avoid the expension with:
> if test -n "$(find . -maxdepth 1 -name \"$NAME\" -print -quit)"
----
thought this would be a winner but it seems to completely miss everything with the $NAME completely

Thanks

Craig


More information about the CentOS mailing list