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

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



I struggled with spaces as well.

 

The program was supposed to be called as below in windows command line interpreter:

 

Worker.exe /Param1 /Param2:”more_argument with spaces=’constant with spaces’ “

 

 

After some struggle I figured out a jobWrapper.bat file with only one line

%*

 

The submit job has following lines:

Executable = jobWrapper.bat

Arguments = "Worker.exe '/Param1' '/Param2:more_argument with spaces=’’constant with spaces’’ ' "

 

Michal

 


From: condor-users-bounces@xxxxxxxxxxx [mailto:condor-users-bounces@xxxxxxxxxxx] On Behalf Of Wei Wang
Sent: Thursday, December 04, 2008 8:42 PM
To: Condor-Users Mail List
Subject: Re: [Condor-users] Parsing quoted arguments in Condor

 

Hi all,

I tried two cases:

#1. arguments = "-a a_value -b '""b_mod -b_op1 b_op1_value""'", two double-quotes to escape the double-quote, a pair of single-quote to make sure the whitespaces are part of the argument.

#2. arguments = "-a a_value -b '''""b_mod -b_op1 b_op1_value""'''", suggested by J.K.

Both are leagal but both had the problem that "b_mod -b_op1 b_op1_value" can't be parsed for "b_mod" further after the whole string is treated as one argument for the main program.

According to the logfiles of the Condor jobs, it seems that Condor decides to put in pairs of single-quotes:  "b_mod' '-b_op1' 'b_op1_value", which makes sure that the string "b_mod -b_op1 b_op1_value" is treated by Condor as one argument, which is what we want.  But this caused the problem of parsing "b_mod -b_op1 b_op1_value" for the module "b_mod". We want "-b_op1 b_op1_value" to be the arguments of "b_mod" but Condor's single-quote pairs destroyed this.

It seems we are stuck......

Any ideas? Thanks.


--- Wei

On Fri, Dec 5, 2008 at 9:08 AM, Kewley, J (John) <john.kewley@xxxxxxxxxx> wrote:

>> Do you mean: arguments = "-a a_value -b '""b_mod -b_op1 b_op1_value""'" ?
>  I tried the one you typed literally and Condor complained:

I was going to suggest:
arguments = "-a a_value -b '''""b_mod -b_op1 b_op1_value""'''"

JK


_______________________________________________
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/




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

Any information contained in or attached to this e-mail is intended solely for the use of the intended recipient(s), is confidential and may contain information that is legally privileged. If you are not an intended recipient of this e-mail, please notify the sender of the delivery error and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this e-mail is expressly prohibited. See http://www.bankofamerica.com/emaildisclaimer (if this link is not clickable, please copy and paste the link into your browser address bar) for further important information on confidentiality, the risks inherent in electronic communication (including the possibility that e-mail messages cannot be guaranteed to be secure or free of errors or viruses), some of our policies regarding transactions and pricing and certain other matters.