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

Re: [Condor-users] changing requirements after a job is submitted





--On 18 April 2005 15:57 +0100 Matt Hope <matthew.hope@xxxxxxxxx> wrote:

On 4/18/05, Kewley, J (John) <j.kewley@xxxxxxxx> wrote:
> > Make damn sure you get it right or you'll be VERY annoyed...
>
> Maybe this is interesting for you,
>
> For some reason, you have to write three quotation marks to
> edit a string
> value if you use Condor for Windows. For example, if you want
> to change the
> requirements from WINNT50 to WINNT51 you have to write
>
> Condor_qedit requirements """WINNT51"""

Would
Condor_qedit requirements '"WINNT51"'

not work?

In Unix and Linux you'd have to protect your params from the shell, I'd
have thought the above would work in that case. If you are doing it from
within a .cmd/.bat file then I suspect some other sort of quoting would
be neccessary.

The cmd shell's escaping would appear not so well documented as for bash.

I find running most commands from cygwin much easier...

then just remember to escape any " which is not itself being used for
grouping a string with whiespace into one argument

so

condor_qedit Requirements "OpSys == \"WINNT51\" || OpSys == \"WINNT52\""
works.

cmd does not remove the surrounding quotes used to perform grouping
when passing the arguments along

[winXP]
echo "foo bar"
"foo bar"
Contract this with bash [cygwin]:

$ echo "foo bar"
foo bar

Not sure if this was clear but I was using Solaris/ksh so the single quotes worked fine. I guess if there were single quotes in the attribute-value there would be problems - but I don't think Condor uses single quotes ????


motto - if you want to use command lines with potentially dangerous chracters then

1) learn your command line shell
2) if 1 is unworkable get a new one :)

3) keep a supply of paracetamol handy - particularly if using sed, awk ...

-ian.

Matt

_______________________________________________
Condor-users mailing list
Condor-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/condor-users