Author Topic: single cmdline job with multiple commands  (Read 3336 times)

EricD

  • Jr. Member
  • **
  • Posts: 3
single cmdline job with multiple commands
« on: November 26, 2008, 11:24:25 PM »
I'm trying to run a single cmdline job which has multiple commands strung together.  I've already tried separating the commands with ; and && and get errors in both cases (exit status 64).

I tried running the command  in a shell and it works fine so I know my syntax is correct.

What's the proper delimiter to use with Qube?

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Re: single cmdline job with multiple commands
« Reply #1 on: November 26, 2008, 11:38:36 PM »
Qube cmdline jobs can use both "&&" and ";" separators.  The exact results depend on the operating system.   For example, setting the command in a cmdline job to
Code: [Select]
set && ls
will list the environment and then list the directories in the stdout for a Linux or OSX Worker.

Can you provide an example command that is failing?

EricD

  • Jr. Member
  • **
  • Posts: 3
Re: single cmdline job with multiple commands
« Reply #2 on: November 26, 2008, 11:55:04 PM »
Here's the command (truncated) as it appears in Qube:

cp "-f" "/Volumes/Projects/spin/bin/shake_scripts/QTDefault/photoJPEG_quicktime.h" "/Volumes/Projects/spin/bin/shake_scripts/include/startup/QTDefault.h" ";" "shake" "/Volumes/Projects/spin/bin/eric/Test/4_CGI_08/2048x1556/4_CGI_08.1-73#####.dpx" "-t" "1-74" "-makemovie"

The jobs are running under OSX

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Re: single cmdline job with multiple commands
« Reply #3 on: November 27, 2008, 03:15:40 AM »
It looks like the job was submitted using qbsub from the commandline.  You will need to put the entire command set in quotes and also escape with \ any embedded quotes needed. 

Undesired results example
Code: [Select]
$ qbsub echo test this out
Results in
cmdline         : echo "test" "this" "out"

Desired results example 1
Code: [Select]
$ qbsub "echo test this out"Results in
cmdline         : echo test this out

Desired results example 2
Code: [Select]
$ qbsub "echo test \"this\" out"Results in cmdline         : echo test "this" out


Note: From the QubeGUI Submit->Cmdline Job these bracketing and escaped quotes are not needed.

EricD

  • Jr. Member
  • **
  • Posts: 3
Re: single cmdline job with multiple commands
« Reply #4 on: November 27, 2008, 05:32:40 PM »
Thanks, that did the trick.