diff --git a/tsshbatch.rst b/tsshbatch.rst index a02dbe1..be3cf75 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -550,7 +550,7 @@ You have to have a name but the value is optional. ``.define FOO=`` simply replaces any subsequent ``FOO`` strings - with .. nothing, effectively removing them. + with nothing, effectively removing them. Any ``=`` symbols to the right of the one right after ``name`` are just considered part of the variables value. @@ -564,14 +564,23 @@ .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 - 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. - - Variable names and values are *case sensitive*. + - Variables may be defined in either ``cmdfiles`` or + ``hostlistfiles`` but they are *visible to any subsequent file + that gets read*. For instance, ``cmdfiles`` are read before any + ``hostlistfiles``. Any variables you've defined in a + ``cmdfile`` that happen to match a string in one of your hostnames + will be substituted. + + This is usually not what you want, so be careful. One way to + manage this is to use variables names that are highly unlikely + to ever show up in a hostname or command. That way your + commands and hostnames will not accidentally get substrings + replaced with variable values. For example, you might + use variable names like ``--MYLSCOMMAND--`` or + ``__DISPLAY_VGS__``. + - Variable substitution is also performed on any host names or commands passed on the command line. @@ -673,7 +682,7 @@ :: - $Id: tsshbatch.rst,v 1.130 2013/10/29 15:27:32 tundra Exp $ + $Id: tsshbatch.rst,v 1.131 2013/10/29 17:34:48 tundra Exp $ You can find the latest version of this program at: