[plug] Parenthesis in shell script

Euan de Kock euan at dekock.net
Sun Apr 22 19:46:12 WST 2012


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



More information about the plug mailing list