diff master/bin/wbash.sh @ 30:9275e2a8b5e2

hacking to get id into wbash.sh, maybe buggy?
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 19 Nov 2018 18:32:30 +0000
parents 55e953e5c66f
children
line wrap: on
line diff
--- a/master/bin/wbash.sh	Mon Nov 19 18:31:21 2018 +0000
+++ b/master/bin/wbash.sh	Mon Nov 19 18:32:30 2018 +0000
@@ -2,16 +2,25 @@
 if [ $# -lt 1 ]
 then
   cat 1>&2 <<EOF
-Usage: cat cmds | $0 SSname [...args]
+Usage: cat cmds | $0 [-d] [-x] SSname [...args]
 Where SSname is the name of a VM scale set.
 
 Runs bash [with args] on every machine in a scale set,
  on commands from stdin
  by doing as it were
-  cat | ssh machine "bash \$args"
+  cat | ssh machine [$id] "bash \$args"
+
+if -d, show command eventually on stderr
 EOF
  exit 1
 fi
+if [ $1 = -d ]
+then
+ shift
+ debug=-d
+fi
 ss=$1
 shift
-wrun.sh $ss bash -x -ff - -i "$@" '\<ifile.txt'
+wrun.sh $ss '"bash -s"' $debug -ff - -i "$@" '\<ifile.txt'
+
+