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

Re: [Condor-users] Windows template file: args with quotes?

I've tried all the combinations of quotes, including what's specified in the docs but nothing worked so I ended up putting the parameters in a batch file and submitting that. This is only a Windows problem, escaping quotes is fine in Linux.

>From the docs:
	In the old syntax, arguments are delimited (separated) by space characters. Double-quotes must be escaped with a backslash (i.e. put a backslash in front of each double-quote).


Here are the rules for using the new syntax:
	1. Put double quotes around the entire argument string. This distinguishes the new syntax from the old, because these double-quotes are not escaped with backslashes, as required in the old syntax. Any literal double-quotes within the string must be escaped by repeating them.
	2. Use white space (e.g. spaces or tabs) to separate arguments.
	3. To put any white space in an argument, you must surround the space and as much of the surrounding argument as you like with single-quotes.
	4. To insert a literal single-quote, you must repeat it anywhere inside of a single-quoted section.

So, if I'm reading this right, to put in a parameter inside quotes and with a space using the new rules, I need something like this:

Arguments = "-d 1 -e 2 -f '""m D""' -U T"   <- that's double quotes around the whole thing, double-double quotes (to escape a double quote) and single quotes around that as there's a space in it.

Is it just me or is this getting overly complicated?

Also, on a completely different note, I couldn't find any mention of using != in the requirements. Perhaps I overlooked it (or it's assumed) but it should probably be in the docs for the list of comparison operators.


> -----Original Message-----
> From: condor-users-bounces@xxxxxxxxxxx [mailto:condor-users-
> bounces@xxxxxxxxxxx] On Behalf Of Kevin.Buckley@xxxxxxxxxxxxx
> Sent: Tuesday, 3 November 2009 12:29 p.m.
> To: Condor-Users Mail List
> Subject: Re: [Condor-users] Windows template file: args with quotes?
> > What's the trick to using quotes in the Arguments in a template?
> > I'm submitting a megablast job and the args have quotes in them but no
> > amount of escaping or back-slashing or substitution is getting me around
> > it.
> >
> > I need something like this:
> > Arguments = -D 2 -m 8 -U T -F "m D"
> >
> Hi Russell,
> If I have an arguments line in the submission file as follows:
> arguments  = something \"in\" quotes
> then condor_q tells me that the actual submission is
> $ condor_q -format "%d " ClusterId  -format "%s " Cmd -format "%s\n" Args
> 12345 /path/to/exe/filename.exe something "in" quotes
> and if I have:
> arguments  = something \"in quotes\"
> then I see:
> $ condor_q -format "%d " ClusterId  -format "%s " Cmd -format "%s\n" Args
> 12346 /path/to/exe/filename.exe something "in quotes"
> Is that not what you want ?
> --
> Kevin M. Buckley                                  Room:  CO327
> School of Engineering and                         Phone: +64 4 463 5971
>  Computer Science
> Victoria University of Wellington
> New Zealand
> _______________________________________________
> 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/
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.