Re: stupid bash question

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



On Wed, Aug 15, 2012 at 5:08 PM, Craig White <craig.white@xxxxxxxxxx> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux