commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Schlipf <carsten.schl...@yeap.de>
Subject Re: Commons CLI : Executing from shell script ?
Date Sat, 21 Nov 2009 22:04:17 GMT
In case of a space in an argument $* will not help, but $@.

Henri Yandell wrote:
> Does using $* help? Even if it doesn't, it would be more concise.
> 
> I'm assuming one of the variables you're passing through contains a
> space and is splitting things up after the quotes surrounding it are
> lost. Does the number of arguments increase?
> 
> Hen
> 
> On Thu, Nov 19, 2009 at 2:21 AM, Ashika Umanga Umagiliya
> <aumanga@biggjapan.com> wrote:
>> Greetings all,
>>
>> In my application I have used Commons CLI to parse command line arguments.
>> I want to run my JAR file using shell script because , I have to setup some
>> environment variables.
>> But it seems that shell script messing around with argument order/number.
>>
>> My shell script is as follows:
>>
>>
>> export ARCH=lx24-amd64
>> export SGE_ROOT=/SGE6/sge6.2
>> export LD_LIBRARY_PATH=$SGE_ROOT/lib/$ARCH/
>> #echo $SGE_ROOT
>> #echo $LD_LIBRARY_PATH
>> java -jar analyse.jar $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16
>> $17 $18 $19 $20
>>
>>
>> But  when I run directly from shell using "java -jar analyse.jar ..... "
>> everything works fine.
>>
>> Any tips?
>>
>> Thanks in advance.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message