eval takes a string argument, not an array:
g! cmd = 'lb -s system'
lb -s system
g! eval $cmd
START LEVEL 1
ID|State |Level|Symbolic name
0|Active | 0|org.apache.felix.framework (5.4.0)|5.4.0
if you really have the command in an array:
g! cmdv = [lb -s system]
lb
-s
system
g! eval "$cmdv"
lb,
-s,
system
you need to convert it to a string first:
g! stringclass = ((bundle 0) loadclass java.lang.String)
g! cmds = ($stringclass join " " $cmdv)
lb -s system
g! eval $cmds
START LEVEL 1
ID|State |Level|Symbolic name
0|Active | 0|org.apache.felix.framework (5.4.0)|5.4.0
g!
—
Derek
> On 7 Sep 2016, at 09:56, Andreas Sewe <[email protected]> wrote:
>
> Hi,
>
> I am currently struggling with the eval command for the Gogo shell.
> Unfortunately, I wasn't able to dig up any documentation on it. Not even
> "help eval" returns something (probably, because eval is not a "real"
> command).
>
> What I want is essentially the following:
>
>> cmdline = [ "command" "arg1" "arg2" ]
>> eval $cmdline
>
> Is this possible somehow?
>
> Best wishes,
>
> Andreas
>
> --
> Codetrails GmbH
> The knowledge transfer company
>
> Robert-Bosch-Str. 7, 64293 Darmstadt
> Phone: +49-6151-276-7092
> Mobile: +49-170-811-3791
> http://www.codetrails.com/
>
> Managing Director: Dr. Marcel Bruch
> Handelsregister: Darmstadt HRB 91940
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>