[plug] Parenthesis in shell script

Garry garbuck at westnet.com.au
Mon Apr 23 06:40:17 WST 2012


Thanks Euan and Daniel,

Yes, problem was it aborting at first failed command, a mv command when 
there was nothing to move..

Thanks

Garry


On 22/04/12 19:46, Euan de Kock wrote:
> Hi Garry,
>
> Are you sure it's the rm command failing - this looks OK to me, and a
> quick check locally using bash seems to support that.
>
> Try moving them all on to different lines, so they are not dependent on
> the success of the previous commands exit status.
>
> Regards,
>
> Euan.
>
> On 04/22/12 09:59, Garry wrote:
>> I've got a shell script which evens out the volumes of mp3s, and
>> should remove any with a left bracket in the filename. This is to
>> remove duplicates, they are named filename(2).mp3 etc.
>>
>> mp3gain -k -r -v mp3pods/*&&  du -h mp3pods/&&  echo "Removing files
>> with brackets - i.e. duplicates"&&  rm -v mp3pods/*'('*.mp3
>>
>> I've tried it using \ to escape it, single ' either side, double "
>> either side.. No good.
>>
>> Can anyone enlighten me on the incantations indicated please?
>>
>> Thanks
>>
>> Garry
>> _______________________________________________
>> PLUG discussion list: plug at plug.org.au
>> http://lists.plug.org.au/mailman/listinfo/plug
>> Committee e-mail: committee at plug.org.au
>> PLUG Membership: http://www.plug.org.au/membership
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>



More information about the plug mailing list