Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Condor-users] arguments with spaces?
- Date: Mon, 20 Dec 2004 17:02:53 -0800
- From: Kelly Felkins <kfelkins@xxxxxxx>
- Subject: [Condor-users] arguments with spaces?
Please help.
I am trying to pass arguments with spaces to a perl script via condor.
Condor seems to provide them to the executable as separate arguments.
Here is my test script:
#!/usr/local/perl561/bin/perl -w
print "ARGS:\n";
foreach (0 .. $#ARGV ) {
print "$_ $ARGV[$_]\n";
}
Here is the output if run on a command line:
bash$ ./test.pl one two "three and four" five six
ARGS:
0 one
1 two
2 three and four
3 five
4 six
bash$
Please note that "three and four" are one argument.
condor_submit gives an error if you use double quotes:
bash$ condor_submit test.sub
Submitting job(s)
ERROR: Parse error in expression:
Args = "one two "three and four" five six"
^^^
Error in submit file
bash$
change the double quotes to single quotes and you can submit, but the
quoted argument becomes 2 arguments, and you get to keep the single quotes:
bash$ condor_submit test.sub
Submitting job(s).
Logging submit event(s).
1 job(s) submitted to cluster 961.
bash$ cat out.test.pl
ARGS:
0 one
1 two
2 'three
3 and
4 four'
5 five
6 six
bash$
I've tried escaping the space and quoting the argument every way that I
can. Please help.
Thank you.
-Kelly