commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: [CLI1.x] quoted arguments split into multiple values
Date Thu, 12 Mar 2009 18:30:38 GMT
Hi Michael,

Michael Heuer wrote:

> Hello,
> 
> With cli 1.1 and the java class wrapped with a bash script, quoted
> arguments are split into multiple values.
> 
> myclass.sh:
> 
> #!/bin/bash
> 
> java MyClass $@
> 
> 
> e.g.
> 
> $ myclass.sh --foo "Foo Bar"
> 
> 
> Option foo = ...;
> Options options = ...;
> CommandLineParser parser = ...;
> CommandLine commandLine = parser.parse(options, args);
> String value = foo.getValue();
> // expected value "Foo Bar", was "Foo"
> 
> 
> Is this a problem with cli or with the bash script?

Bash. You want "$@".

- Jörg


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


Mime
View raw message