diff --git a/tsshbatch.rst b/tsshbatch.rst index 4cb4e84..72f6160 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -39,6 +39,9 @@ on either the command line or in the ``$TSSHBATCH`` environment variable: + -K Force prompting for passwords. This is used + to override a prior ``-k`` argument. + -G spec GET file on host and write local dest directory. ``spec`` is a quoted pair of strings. The first specifies the path of the source file (on the @@ -348,6 +351,13 @@ tsshbatch.py -k AIX-prod-hosts ls -al + This is so common that you may want to set it in your + ``$TSSHBATCH`` environment variable so that keys are used by + default. If you do this, there may still be times when you want + for force prompting for passwords rather than using keys. You can + do this with the ``-K`` option which effectively overrides any + prior ``-k`` selection. + 4) Executing A ``sudo`` Command @@ -598,6 +608,49 @@ or commands passed on the command line. +11) Using The Current Hostname In Commands And File Transfers + + There are times when it's convenient to be able to embed the name + of the current host in either a command or in a file transfer + specification. For example, suppose you want to use a single + invocation of ``tsshbatch`` to transfer files in a host-specific + way. You might name your files like this:: + + myfile.host1 + myfile.host2 + + Now, all you have to do is this:: + + tsshbatch.py -xH "host 1 host2" -P "myfile. ./" + + When run, ``tsshbatch`` will substitute the name of the current + host in place of the string ````. + + You can do this in commands (and commands within command files) as + well:: + + tsshbatch -x hosts 'echo I am running on ' + + Be careful to escape and quote things properly, especially from the + the command line, since ``<`` and ``>`` are recognized by the shell + as metacharacters. + + There are two forms of host name substitution possible. The first, + ```` will use the name *as you provided it*, either as + an argument to ``-H`` or from within a host file. + + The second, ````, will only use the portion of the name + string you provided up to the leftmost period. + + So, if you specify ``myhost1.frumious.edu``, ```` will be + replaced with that entire string, and ```` will be replaced + by just ``myhost1``. + + Notice that, in no case does ``tsshbatch`` do any DNS lookups to + figure this stuff out. It just manipulates the strings you provide + as hostnames. + + OTHER ----- @@ -673,7 +726,7 @@ COPYRIGHT AND LICENSING ----------------------- -**tsshbatch** is Copyright (c) 2011-2013 TundraWare Inc. +**tsshbatch** is Copyright (c) 2011-2014 TundraWare Inc. For terms of use, see the ``tsshbatch-license.txt`` file in the program distribution. If you install **tsshbatch** on a FreeBSD @@ -695,11 +748,8 @@ :: - $Id: tsshbatch.rst,v 1.133 2014/01/20 17:35:23 tundra Exp $ + $Id: tsshbatch.rst,v 1.134 2014/03/27 23:30:53 tundra Exp $ You can find the latest version of this program at: http://www.tundraware.com/Software/tsshbatch - - -