Running gogo shell client api commands via shell script

907 Views Asked by At

I am trying to run create targets via gogo shell client api. I have written a script which starts the client.jar from apache ace distribution. Then I am trying to run the gogo shell client api commands in the same script.

The script code is:

#!/bin/bash

This cmd starts the gogo shell:

java -Dagent.discovery.serverurls="http://localhost:8080"     -Dorg.apache.ace.r="localhost:8080"     -Dorg.apache.ace.obr="localhost:8080"     -Dorg.osgi.service.http.port=-1     -Dorg.apache.ace.configurator.CONFIG_DIR="/path/apache-ace-2.0.1-bin/client/conf"     -Dace.gogo.script.delay="3000"     -jar /path/apache-ace-2.0.1-bin/client/client.jar  & MyPID=$!                        
echo $MyPID

This creates a workspace in the gogo shell:

w = (cw)

$w cf property-feature

$w lf

But when i run the script i get an error saying

./script.sh: line 6: syntax error near unexpected token (' ./script.sh: line 6: `w = (cw)'

Note: I am trying to manually run the script by running ./script.sh in the terminal. Any ideas on this would be really helpful.

0

There are 0 best solutions below