[mythtv-users] Bash Script help please
Brad DerManouelian
myth at dermanouelian.com
Tue Oct 10 19:12:57 UTC 2006
On Oct 10, 2006, at 11:49 AM, Jeff volckaert wrote:
>> This is just for the record since it's working to the OP's
>> satisfaction but bash does substitutions like this:
>>
>> TITLE=${TITLE//[^a-zA-Z0-9]/}
>>
>> It saves a subprocess which can be helpful in a loop.
>>
>
> I spoke too soon. I am using:
> TITLE=`echo $3 | sed s/[^a-zA-Z0-9]//g`
>
> ($3 is the third variable passed to it which is TITLE)
>
> and getting files like "Will-.avi".
>
> I'll try using:
>
> TITLE=$3
> TITLE=${TITLE//[^a-zA-Z0-9]/}
>
> and see if that helps.
>
> Jeff
I haven't been following the whole thread, but is there any reason
you're not using mythrename.pl in the contrib folder? Seems to do
exactly what you want. With the right flags, you can format the name
how you like and make symlinks of the pretty names that link to the
default myth names.
More information about the mythtv-users
mailing list