From cb3aa92febd16c8af901066dffd9f428c8ef255a Mon Sep 17 00:00:00 2001 From: Duncan Ferguson Date: Sat, 3 Dec 2011 10:03:03 +0000 Subject: [PATCH] Get "-a 'cmd ; cmd'" multiple commands working Previously cssh -a "hostname ; hostname" would return the remote hostname and the local hostname. Fix to allow for both commands to run on the remote server. --- Changes | 1 + WIP_TASKS | 1 - lib/App/ClusterSSH/Helper.pm | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 4b28c0c..f38eb3c 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,7 @@ * Rework config handling into a module * Rework cluster handling into a module * Added 'autoclose' functionality - see docs +* Allow "-a 'cmd ; cmd'" to work for multiple remote commands 2011-07-28 Duncan Ferguson - v4.00_11 * Fix '-l ' option (SF bug 3380675) diff --git a/WIP_TASKS b/WIP_TASKS index 7a1dac0..e69de29 100644 --- a/WIP_TASKS +++ b/WIP_TASKS @@ -1 +0,0 @@ -allow for multiple commands with -a 'echo ; echo ; echo' diff --git a/lib/App/ClusterSSH/Helper.pm b/lib/App/ClusterSSH/Helper.pm index 1999953..07c5898 100644 --- a/lib/App/ClusterSSH/Helper.pm +++ b/lib/App/ClusterSSH/Helper.pm @@ -119,7 +119,7 @@ sub script { \$command .= "\$svr"; } } - \$command .= " $command ; $postcommand"; + \$command .= " \\\"$command\\\" ; $postcommand"; warn("Running:\$command\\n"); # for debug purposes exec(\$command); HERE