I have a command to execute in a bash script. If I run the command directly in the console, it works fine but if I put it in a script and execute the script, it throws the following error:
Bad command-line arguments
The command I successfully executed in the console is:
output=`java -jar myjar.jar -agent iOS -host localhost /Users/vskumar/monkeytalk/workspace/MonkeyProject/'shoppingcart_deleteproduct - Online_V2.mt'`
In the script, it looks like this:
output=`java -jar $JAR_LOCATION/$JAR_LIST -agent $AGENT_NAME -host $HOST -reportdir $REPORT_DIR/$rep_date $MT_TEST_ROOT_DIR/$SUBSTRING`
where the value of $MT_TEST_ROOT_DIR is
/Users/vskumar/monkeytalk/workspace/MonkeyProject
and the value of $SUSBSTRING is
'shoppingcart_deleteproduct - Online_V2.mt'