On Aug 16, 2012, at 3:14 PM, Kahlil Hodgson wrote:
> On 16/08/12 08:19, Craig White wrote:
>> the relevant snippet is...
>>
>> NAME="*.mov" cd $IN if test -n "$(find . -maxdepth 1 -name $NAME
>> -print -quit)"
>>
> The problem is the outermost double quotes in the "$(...)" expression
> and figu
On 16/08/12 08:19, Craig White wrote:
> the relevant snippet is...
>
> NAME="*.mov" cd $IN if test -n "$(find . -maxdepth 1 -name $NAME
> -print -quit)"
>
The problem is the outermost double quotes in the "$(...)" expression
and figuring out how to pass the appropriate quotes into the subshell
cre
On Aug 15, 2012, at 5:11 PM, fred smith wrote:
> how about something (seemingly simple) like this:
>
> find out how many there are:
>
> count=`ls * | grep -c .MOV$`
>
> then diagnose the result:
>
> if [ $count -ge 1 ]
> then
> do your stuff here
>
On 08/15/2012 06:19 PM, Craig White wrote:
> the relevant snippet is...
>
> NAME="*.mov"
> cd $IN
> if test -n "$(find . -maxdepth 1 -name $NAME -print -quit)"
>
> and if there is one file in this directory - ie test.mov, this works fine
>
> but if there are two (or more) files in this directory -
On Wed, Aug 15, 2012 at 05:19:22PM -0600, Larry Martell wrote:
> On Wed, Aug 15, 2012 at 5:08 PM, Craig White 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 i
On Wed, Aug 15, 2012 at 5:08 PM, Craig White 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
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 Au
Put escaped double quotes around name, like \"$NAME\" in the test expression.
--
Pat Welch
Sent from my Android phone with K-9 Mail.
Craig White wrote:
the relevant snippet is...
NAME="*.mov"
cd $IN
if test -n "$(find . -maxdepth 1 -name $NAME -print -quit)"
and if there is one file in this
I gess you could also avoid the expension with:
if test -n "$(find . -maxdepth 1 -name \"$NAME\" -print -quit)"
2012/8/15 Steve Thompson :
> On Wed, 15 Aug 2012, Craig White wrote:
>
>> the relevant snippet is...
>>
>> NAME="*.mov"
>> cd $IN
>> if test -n "$(find . -maxdepth 1 -name $NAME -print -
On Wed, 15 Aug 2012, Craig White wrote:
> the relevant snippet is...
>
> NAME="*.mov"
> cd $IN
> if test -n "$(find . -maxdepth 1 -name $NAME -print -quit)"
>
> and if there is one file in this directory - ie test.mov, this works fine
>
> but if there are two (or more) files in this directory - te
On Wed, Aug 15, 2012 at 4:19 PM, Craig White wrote:
> the relevant snippet is...
>
> NAME="*.mov"
> cd $IN
> if test -n "$(find . -maxdepth 1 -name $NAME -print -quit)"
>
> and if there is one file in this directory - ie test.mov, this works fine
>
> but if there are two (or more) files in this di
the relevant snippet is...
NAME="*.mov"
cd $IN
if test -n "$(find . -maxdepth 1 -name $NAME -print -quit)"
and if there is one file in this directory - ie test.mov, this works fine
but if there are two (or more) files in this directory - test.mov, test2.mov
then I get an error...
find: paths mu
12 matches
Mail list logo