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

Jeff Simpson jeffsimpson at alum.wpi.edu
Thu Mar 13 14:45:56 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?

Here's how I call my script. I don't have quotes around the %CHANID%
or %STARTTIME% because they don't contain spaces. if it was escaping
spaces, I would think that perl getopt wouldn't be able to interpret
the parameters properly.

/usr/local/bin/video2ipod.pl -myth -tvdotcom -chanid %CHANID%
-starttime %STARTTIME% -log /tmp/video2ipod.log -verbose -debug
-output /mnt/store/recordings/ipod

 - Jeff

>
>  Ben
>  _______________________________________________
>  mythtv-users mailing list
>  mythtv-users at mythtv.org
>  http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list