diff --git a/tsshbatch.rst b/tsshbatch.rst index 25634ce..5c3bab6 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -377,7 +377,7 @@ 3. Command Line/$TSSHBATCH environment variable sets name 4. Name picked up from $USER (Default behavior) - If try to use Key Exchange and ``tsshbatch`` detects a command + If you try to use Key Exchange and ``tsshbatch`` detects a command beginning with ``sudo``, it will prompt you for a password anyway. This is because ``sudo`` requires a password to promote privilege. @@ -410,12 +410,12 @@ This saves the file ``myhost:foo`` in the ``./`` on your local machine. - The commands do not recognize any special directory shortcut symbols - like ``~/``. You must name file and directory locations using - ordinary pathing conventions. You can put as many of these requests - on the command line as you like to enable ``GETs`` and ``PUTs`` of - multiple files. You cannot, however, use filename wildcards to - specify multi-file operations. + These commands do not recognize any special directory shortcut + symbols like ``~/`` like the shell interpreter might. You must name + file and directory locations using ordinary pathing conventions. + You can put as many of these requests on the command line as you + like to enable ``GETs`` and ``PUTs`` of multiple files. You cannot, + however, use filename wildcards to specify multi-file operations. You can put multiple ``GETs`` or ``PUTs`` on the command line for the same file. They do not override each other but are @@ -432,7 +432,7 @@ If any file transfer fails, for any reason, the program is aborted and no further work is done. -7) File Commenting And Includes +7) Commenting Both the ``cmdfile`` and ``hostlistfile`` can be freely commented using the ``#`` character. Everything from that character to the @@ -440,12 +440,13 @@ freely, except in cases where it would change the syntax of a command or host name. - You may also include other files as you wish with the - ``.include filename`` directive anywhere in the ``cmdfile`` or - ``hostlistfile``. This is useful for breaking up long lists - of things into smaller parts. For example, suppose you - have three host lists, one for each major production areas - of your network:: +8) Includes + + You may also include other files as you wish with the ``.include + filename`` directive anywhere in the ``cmdfile`` or + ``hostlistfile``. This is useful for breaking up long lists of + things into smaller parts. For example, suppose you have three + host lists, one for each major production areas of your network:: hosts-development hosts-stage @@ -479,7 +480,7 @@ created. -8) Include Paths +9) Search Paths ``tsshbatch`` supports the ablity to search paths to find files you've referenced. The search path for ``cmdfiles`` is specified @@ -503,28 +504,31 @@ specified is in your local (invoking) directory and/or whether it is a fully qualified file name before attempting to look down a search path. If a file exist in several locations, the first - instance found "wins". + instance found "wins". So, for instance, if you have a file called + ``myhosts`` somewhere in the path defined in ``$TSSHBATCHHOSTS``, + you can override it by creating a file of same name in your current + working directory. ``tsshbatch`` also checks for so-called "circular includes" which would cause an infinite inclusion loop. It will abort upon discovering this, prior to any file tranfers or commands being executed. -9) Defining Variables +10) Defining Variables ``tsshbatch`` allows you to define variables which will then be used to replace matching strings in both ``cmdfiles`` and ``hostlistfiles``. For example, suppose you have this in a ``hostlistfile``:: - .define DOMAIN=.my.own.domain.com + .define DOMAIN=.my.own.domain.com - host1DOMAIN - host2DOMAIN - host3DOMAIN + host1DOMAIN + host2DOMAIN + host3DOMAIN At runtime, the program will actually connect to - ``host1.my.own.domain.com``, ``host1.my.domain.com``, and so on. + ``host1.my.own.domain.com``, ``host2.my.domain.com``, and so on. This allows for ease of modularization and maintenance of your files. @@ -558,7 +562,7 @@ ``hostlistfiles`` but they are *global*. ``cmdfiles`` are read before any ``hostlistfiles`` so any variables you've defined that happen to match a string in your list of hosts will be - substituted so be careful. + substituted - so be careful. - Variable names and values are *case sensitive*. @@ -578,7 +582,7 @@ argument of ``.include bar``. If you do it in a ``hostlistfile``, the program thinks you're tryingto contact a host called ``foo .include bar``. In neither case is this likely to be quite what you had in -mind. Simularly, everything to the right of the directive is +mind. Similarly, everything to the right of the directive is considered its argument (up to any comment character). Whitespace is not significant at the beginning or end of a line but it @@ -660,7 +664,7 @@ :: - $Id: tsshbatch.rst,v 1.125 2013/10/29 01:13:31 tundra Exp $ + $Id: tsshbatch.rst,v 1.126 2013/10/29 02:52:51 tundra Exp $ You can find the latest version of this program at: