Problem sending remote commands via SSH to remote host
Rodrick Brown
rbrown at BallistaSec.com
Fri May 2 14:17:25 UTC 2008
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
More information about the redhat-list
mailing list