Thank you very much, now it works all fine.jcfp wrote:Proper quoting of variables in your script is your own responsibility. Without quoting, thing go awry as soon as you try to pass an argument that just happens to be empty (these disappear) or contains spaces (one argument becomes multiple).Spamixxus wrote:With my sh script, the String is not one line, because the "" are missing.Code: Select all
#!/usr/bin/sh echo $1 $2 $3 $4 $5 $6 $7 $8 python /var/db/sabnzbd/scripts/nzbToMedia/nzbToSickBeard.py $1 $2 $3 $4 $5 $6 $7 $8 python /var/db/sabnzbd/scripts/nzbToMedia/sabtowizznab.py $1 $2 $3 $4 $5 $6 $7 $8
While you're at it, note there's "$@" as a shorthand for all arguments. So simply /path/to/script "$@" would work just fine without the need to write out $1 through $n.
I use the "$@" in every line.
Code: Select all
#!/bin/sh
python /var/db/sabnzbd/scripts/nzbToMedia/nzbToSickBeard.py "$@"
python /var/db/sabnzbd/scripts/nzbToMedia/sabtowizznab.py "$@"
[02:53:54] [INFO]::MAIN: Loading config from [/media/scripts/nzbToMedia/autoProcessMedia.cfg]
[02:53:59] [INFO]::MAIN: The /media/scripts/nzbToMedia/nzbToSickBeard.py script completed successfully.
uploading file /media/nzbs/nzbbackup/*.gz...