[CentOS] stupid bash question

Wed Aug 15 23:19:22 UTC 2012
Larry Martell <larry.martell at gmail.com>

On Wed, Aug 15, 2012 at 5:08 PM, Craig White <craig.white at ttiltd.com> wrote:
> 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

This worked for me:

$ cat t.sh
set -o noglob
NAME="*.mov"
find . -maxdepth 1 -name $NAME -print

$ touch t.mov t2.mov
$ bash t.sh
./t.mov
./t2.mov