Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] Complex syntax for arguments
- Date: Fri, 15 Feb 2008 19:20:59 -0000
- From: "Kewley, J \(John\)" <j.kewley@xxxxxxxx>
- Subject: Re: [Condor-users] Complex syntax for arguments
If you are on unix, change the executable to a shellscript
that echo each param in turn:
----------
#!/bin/sh
for i in $*
di
echo $i
done
---------
On Windows, best I can come up with is:
echo %1%
echo %2%
...
Anyway, what you originally asked for was:
Actual command-line arguments:
weka.classifiers.meta.Vote -t somefile.arff \
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K "weka.classifiers.kernel""
>From this, assuming no typos, it looks like what you have would run into
trouble on a command line (external to condor) in any case, in fact I
suggest
that this could well be parsed as follows:
weka.classifiers.meta.Vote
-t somefile.arff
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K "
weka.classifiers.kernel
""
Depending what argument parsing you are doing.
The " after -K should probably be escaped if you wanted
-B "weka.classifiers.functions.SMO -K "weka.classifiers.kernel""
and the same for the penultimate one.
How does the following work outside of Condor:
weka.classifiers.meta.Vote -t somefile.arff \
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K
\"weka.classifiers.kernel\""
I am concerned by these "embedded" quotes, maybe you pass the -K
onto another process after? If so, then although the quotes can get
fixed, passing
arguments from script to script can lose which bits of text go with
which argument.
I am not explaining this too well, but you could end up with args like
'4"' (without the
single quotes.
I convert this to arguments = "weka.classifiers.meta.Vote -t
somefile.arff -B ""weka.classifiers.meta.AdaBoostM1 -S 4"" -B
""weka.classifiers.functions.SMO -K ""weka.classifiers.kernel"" "" "
How would the following work (on commandline)
weka.classifiers.meta.Vote -t somefile.arff \
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K 'weka.classifiers.kernel'"
Finally try one of these for Condor:
arguments="weka.classifiers.meta.Vote -t somefile.arff \
-B 'weka.classifiers.meta.AdaBoostM1 -S 4'
-B 'weka.classifiers.functions.SMO -K
'weka.classifiers.kernel''"
or
arguments="weka.classifiers.meta.Vote -t somefile.arff \
-B ''''weka.classifiers.meta.AdaBoostM1 -S 4''''
-B ''''weka.classifiers.functions.SMO -K
''''weka.classifiers.kernel''''"
remembering the rule:
4. To insert a literal single-quote, you must repeat it
anywhere inside of a *** single-quoted *** section.
or
arguments="weka.classifiers.meta.Vote -t somefile.arff \
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K
\"weka.classifiers.kernel\""
I can make several other suggestions (including using ; and | for old
syntax),
but I need to know how you
want to group your arguments (this would matter if you are in vanilla
universe
and executable is a script for instance).
So for
weka.classifiers.meta.Vote -t somefile.arff \
-B "weka.classifiers.meta.AdaBoostM1 -S 4"
-B "weka.classifiers.functions.SMO -K "weka.classifiers.kernel""
I assume the first 4 args are
weka.classifiers.meta.Vote -t somefile.arff -B
but is argument 5:
"weka.classifiers.meta.AdaBoostM1 -S 4"
and should the final bit parse as
2 args:
-B
"weka.classifiers.functions.SMO -K "weka.classifiers.kernel""
or
4 args:
-B
"weka.classifiers.functions.SMO
-K
"weka.classifiers.kernel""
or something else
Cheers
JK