diff --git a/tsshbatch.rst b/tsshbatch.rst index 14e668a..25634ce 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -481,36 +481,34 @@ 8) Include Paths - ``tsshbatch`` supports the ablity to search paths to find - files you've referenced. The search path for ``cmdfiles`` - is specified in the ``$TSSHBATCHCMDS`` environment - variable. The ``hostlistfiles`` search path is - specified in the ``$TSSHBATCHHOSTS`` environment variable. - These are both in standard path delimited format for - your operating system. For example, on Unix-like systems - these look like this:: + ``tsshbatch`` supports the ablity to search paths to find files + you've referenced. The search path for ``cmdfiles`` is specified + in the ``$TSSHBATCHCMDS`` environment variable. The + ``hostlistfiles`` search path is specified in the + ``$TSSHBATCHHOSTS`` environment variable. These are both in + standard path delimited format for your operating system. For + example, on Unix-like systems these look like this:: export TSSHBATCHCMDS="/usr/local/etc/.tsshbatch/commands:/home/me/.tsshbatch/commands" And so forth. - These paths are honored both for any files you specify - on the command line as well as for any files you - reference in a ``.include`` directive. This allows - you to maintain libraries of standard commands and - host lists in well known locations and ``.include`` - the ones you need. + These paths are honored both for any files you specify on the + command line as well as for any files you reference in a + ``.include`` directive. This allows you to maintain libraries of + standard commands and host lists in well known locations and + ``.include`` the ones you need. - ``tsshbatch`` will always first check to see if a file - you've 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". + ``tsshbatch`` will always first check to see if a file you've + 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". - ``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. + ``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 @@ -526,13 +524,13 @@ host3DOMAIN At runtime, the program will actually connect to - ``host1.my.own.domain.com``, ``host1.my.domain.com``, - and so on. This allows for ease of modularization - and maintenance of your files. + ``host1.my.own.domain.com``, ``host1.my.domain.com``, and so on. + This allows for ease of modularization and maintenance of your + files. - Similarly, you might want define ``MYCMD=some_long_string`` - so you don't have to type ``some_long_string`` over and - over again in a ``cmdfile``. + Similarly, you might want define ``MYCMD=some_long_string`` so you + don't have to type ``some_long_string`` over and over again in a + ``cmdfile``. There are some "gotchas" to this: @@ -540,23 +538,21 @@ .define name = value - You have to have a name but the value is optional. - ``.define FOO=`` simply replaces any subsequent - ``FOO`` strings with .. nothing, effectively - removing them. + You have to have a name but the value is optional. ``.define + FOO=`` simply replaces any subsequent ``FOO`` strings + with .. nothing, effectively removing them. - Any ``=`` symbols to the right of the one right - after ``name`` are just considered part of the - variables value. + Any ``=`` symbols to the right of the one right after ``name`` + are just considered part of the variables value. Whitespace around the ``=`` symbol is optional but allowed. - Variables are substituted in the order they appear:: - .define LS = ls -alr - LS /etc # ls -alr /etc - .define LS = ls -1 - LS /foo # ls -1 /foo + .define LS = ls -alr + LS /etc # ls -alr /etc + .define LS = ls -1 + LS /foo # ls -1 /foo - Variables may be defined in either ``cmdfiles`` or ``hostlistfiles`` but they are *global*. ``cmdfiles`` are read @@ -572,26 +568,25 @@ Comments can go anywhere. -Directives like ``.define`` and ``.include`` must -be the first non-whitespace text on the left end -of a line. If you do this in a ``cmdfile``:: +Directives like ``.define`` and ``.include`` must be the first +non-whitespace text on the left end of a line. If you do this in a +``cmdfile``:: foo .include bar -``tsshbatch`` thinks you want to run the command ``foo`` -with an 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 considered its argument (up to any comment character). +``tsshbatch`` thinks you want to run the command ``foo`` with an +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 +considered its argument (up to any comment character). -Whitespace is not significant at the beginning or end of -a line but it is preserved within ``.define`` and ``.include`` -directive arguments as well as within commmand definitions. +Whitespace is not significant at the beginning or end of a line but it +is preserved within ``.define`` and ``.include`` directive arguments +as well as within commmand definitions. -Strictly speaking, you do not have to have whitespace -after a directive. This is recognized:: +Strictly speaking, you do not have to have whitespace after a +directive. This is recognized:: .includesomefileofmine .definemyvar=foo @@ -665,7 +660,7 @@ :: - $Id: tsshbatch.rst,v 1.124 2013/10/29 01:01:15 tundra Exp $ + $Id: tsshbatch.rst,v 1.125 2013/10/29 01:13:31 tundra Exp $ You can find the latest version of this program at: