[mythtv-users] MythBackend incorrectly escaping spaces in user job commands?

Ben Lancaster mail at benlancaster.co.uk
Thu Mar 13 15:04:02 UTC 2008


> On Thu, Mar 13, 2008 at 10:29 AM, Ben Lancaster <mail at benlancaster.co.uk> wrote:
>> Hi,
>>
>>  I'm working on a bash script / user job (based on the one in the wiki)
>>  to automatically transcode recordings for my iPhone. Having followed the
>>  instructions for creating a userjob that does the following:
>>
>>  /usr/local/bin/myth2iphone.sh %DIR% %FILE%
>>
>>  ...both %DIR% and %FILE% are coming in as a single argument to the bash
>>  script ($1), rather than two arguments ($1 and $2), which leads me to
>>  think that the script is being called as:
>>
>>  /usr/local/bin/myth2iphone %DIR%\ %FILE%
>>
>>  (note the backslash, escaping the space between %DIR% and %FILE%)
>>
>>  When I substitute the correct values for %DIR% and %FILE% and call the
>>  script from the command line, the script executes as you'd expect and
>>  correctly processes the passed arguments.
>>
>>  Anybody know what's going on, or what I'm doing wrong? Looks like a bug
>>  to me.
> 
> Not sure what's going wrong there. I've done some work with user
> scripts and haven't seen that issue. Can you post your script?

Same script as found here:

http://mythtv.org/wiki/index.php/Streaming_to_iPod_touch_or_iPhone#Transcoding

The script is in UserJob1, and the command (as in the DB) is

/usr/local/bin/myth2iphone.sh %DIR% %FILE%

Thanks in advance,


More information about the mythtv-users mailing list