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

Re: [Condor-users] Parsing quoted arguments in Condor



Wei,

Are your jobs running on windows or are they running on unix?

When you say that you want to execute the command

exec.py -a a_value -b "b_mod -b_op1 b_op1_value"

are you expecting this:

Arguments #1
arg1: -a
arg2: a_value
arg3: -b
arg4: "b_mod -b_op1 b_op1_value"

or are you expecting this:

Arguments #2
arg1: -a
arg2: a_value
arg3: -b
arg4: b_mod -b_op1 b_op1_value


#1 above should result from this:
arguments = "-a a_value -b '"b_mod -b_op1 b_op1_value"'"

and #2 above should result from this:
arguments = "-a a_value -b 'b_mod -b_op1 b_op1_value'"

--Dan

Wei Wang wrote:

Hi,

We'd like to write a job description file for a Python script which takes arguments in the following way: exec.py -a a_value -b "b_mod -b_op1 b_op1_value". We call the quoted part as a module. And the module here has an option "-b_op1" and its value is "b_op1_value".

So the description file is:
......
executable = exec.py
arguments = "-a a_value -b '"b_mod -b_op1 b_op1_value'""
......

This is equal to executing the following command: exec.py -a a_value -b "b_mod -b_op1 b_op1_value". However, the option "-b_opt1" is treated as the option to exec.py, instead of the module "b_mod".

But if I run "exec.py -a a_value -b "b_mod -b_op1 b_op1_value"" in the command mode, our script works fine.

Somehow, in the Shell created by Condor, the double-quote is not parsed correctly --- they are not being matched.

Does anyone know why?


--- Wei
--
Wei Wang
Department of Physics
University of Wisconsin - Madison
Office: 608-262-3395
Mobile: 917-250-0705(U.S.)
Mobile: 13718027905(China)

------------------------------------------------------------------------

_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at: https://lists.cs.wisc.edu/archive/condor-users/