[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] shell pipe/cmd-chain as job command/argument in python bindings

Hi all,

I just tried to submit a quick job with the Python bindings, where I attempted to run just a few shell commands. I juggled a bit with the position of the execs in the `Cmd` and `Args` keys - but all failed [1]

So, I tried to wrap the &&-chained commands into one string-argument and use the shell as executable [2] (not the most elegant approach...). However, it also failed for me :-/
(I guss the behaviour is similar for submissions through the CLI)

Is there a way to get it running - or is a short script the only way to go...?


    jobAd["Cmd"] = '/usr/bin/env'
    jobAd["Args"] = '&& /usr/bin/cat .job.ad && echo "FOO" '

which actually cat'ed me `echo` - I guess the shell interpretation of operators like `&&` is not possible here, or?

    jobAd["Cmd"] = '/usr/bin/bash'
    jobAd["Args"] = '-c "/usr/bin/cat .job.ad && /usr/bin/echo \FOO\"" '

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature