Java Mailing List Archive

http://www.redhatconfig.com/

Home » Red Hat Linux Discussion »

Problem sending remote commands via SSH to remote host

Rodrick Brown

2008-05-02

Replies:
I've written a script to startup a remote application and I'm running
into issues when trying to run commands on the remote host.

My script tries to execute the following

Here is a subset of my script



#!/bin/bash

host=somehost

export APP_ARGS="-Darg1 -Darg2 -Darg3 -D${VAR1} -D${VAR2} "

${SSH_CMD} ${host} ""${APP_ARGS} -Dfoo=${host} -Dfoo=${host}
com.packahe.AppClass >/dev/null &""



If I use "" "" around ${APP_ARGS} my script backgrounds and works as
stated but I get the following

./script.sh: line 46: : command not found every time yet everything
works as designed



If I use a single " " around ${APP_ARGS} the script runs sequentially
and waits for each execution to finish before moving on I don't want
this behavior but I don't get the following

Issue ./script.sh: line 46: : command not found



Anyone have an idea how exactly I can fix these issues?



Thanks.



---

Rodrick R. Brown



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.