diff --git a/TODO b/TODO index 8f18231..325f2c3 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ [NEW] - - Multiple hostfiles can now be passed via the -i option. The + - Multiple hostfiles can now be passed via the -i option. The argument can be the name of a single file or a quoted list of files. The option can appear on the command line multiple times. -H and -i can be used together to create custom host lists. @@ -40,6 +40,11 @@ lists all the files that do NOT contain any of the specified strings. + - The -r option has been added to suppress reporting of start/stop + statistics. This allows you to make statistics reporting the + default, say via the $TSSHBATCH environment variable, but + override it when you need to. + [CHANGES] @@ -60,10 +65,6 @@ - Add ability to send informative messages back during execution - - Make sure -W works regardless of invocation order - - - Provide option to turn off -B - - Protect path walk from files/dirs that cannot be opened. - File Xfer: Allow from within cmd files. diff --git a/tsshbatch.py b/tsshbatch.py index 6964d6f..f2ed081 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -88,7 +88,7 @@ HOSTLIST = 'Hosts' INDENTWIDTH = 8 NOMATCH = "No string matches!" -OPTIONSLIST = 'BC:EF:G:H:KLNP:ST:V:Wabef:hi:kl:n:p:qstvxy' +OPTIONSLIST = 'BC:EF:G:H:KLNP:ST:V:Wabef:hi:kl:n:p:qrstvxy' PADWIDTH = 12 PATHDELIM = ':' PATHSEP = os.sep @@ -107,7 +107,7 @@ USAGE = \ PROGVER + "\n" +\ HOMEPAGE + "\n\n" +\ - "Usage: tsshbatch.py [-BEF:KLNSTVWaehkqstvy -C configfile -G 'file dest' -P 'file dest' -f cmdfile -l logfile -n name -p pw ] -H 'host ..' -i 'hostfile ...' [command arg ... ]\n" +\ + "Usage: tsshbatch.py [-BEF:KLNSTVWaehkqrstvy -C configfile -G 'file dest' -P 'file dest' -f cmdfile -l logfile -n name -p pw ] -H 'host ..' -i 'hostfile ...' [command arg ... ]\n" +\ " where,\n" +\ "\n" +\ " -B Print start and stop statistics (Off)\n" +\ @@ -135,6 +135,7 @@ " -n name Specify login name\n" +\ " -p pw Specify login password\n" +\ " -q Quiet mode - produce less 'noisy' output\n" +\ + " -r Suppress reporting of start/stop statistics\n" +\ " -s Silence all program noise - only return command output\n" +\ " -t Run in test mode, don't actually execute commands (Default)\n" +\ " -v Display extended program version information\n" +\ @@ -366,7 +367,7 @@ if msg: PrintStderr(msg) - # If requested, print startup banner + # If requested, print banner if BANNERSON: @@ -981,6 +982,9 @@ if opt == "-q": NOISELEVEL = QUIET + if opt == "-r": + BANNERSON = False + if opt == "-s": NOISELEVEL = SILENT diff --git a/tsshbatch.rst b/tsshbatch.rst index 496eb27..640446f 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -30,7 +30,7 @@ -------- :: - tsshbatch.py [-EKLNSTWaehkqstvxy -G 'file dest' -P 'file dest' -f cmdfile -l logfile -n name -p pw ] -H 'host ..' -i 'hostfile ...' [command arg ... ] + tsshbatch.py [-EKLNSTWaehkqrstvxy -G 'file dest' -P 'file dest' -f cmdfile -l logfile -n name -p pw ] -H 'host ..' -i 'hostfile ...' [command arg ... ] DESCRIPTION ----------- @@ -215,6 +215,11 @@ -q Quiet mode - produce less noisy output. Turns off ``-y``. + -r Suppress reporting of start/stop statistics. This + allows you to make statistics reporting the + default, say via the ``$TSSHBATCH`` environment + variable, but override it when you need to. + -s Silence all program noise - only return command output. Applies only to command operations. File transfer and error reporting, generally, are unaffected.