diff --git a/tsshbatch.rst b/tsshbatch.rst index c99dda3..20da060 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -514,6 +514,36 @@ tsshbatch.py -G"/etc/fstab ./tmp" -G"/etc/rc.conf ./tmp" ... +You may also put file transfer specifications into a ``cmdfile``. +This is handy when you have many to do and don't want to clutter +up the command line. Each must be on its own line in the ``cmdfile`` +and in the same form as if it were provided on the command line:: + + -G /path/to/srcfile destdir # This will get a file + -P /path/to/srcfile destdir # This will put a file + +Any single- or double quotes will be removed. + +File transfers are done in the order they appear. For instance, if +you have a file transfer specification on the command line and then +make reference to a ``cmdfile`` with a file transfer specification in +it, the one on the command line gets done first. + +.. NOTE:: Keep in mind that ``tsshbatch`` always processes file + transfers *before* executing any commands, no matter what + order they appear in the ``cmdfile``. If you have this in a + ``cmdfile``:: + + echo "Test" + -P "./myfile /foo/bar/baz/" + + The file will be transferred *before* the ``echo`` command + gets run. This can be counterintuitive. It's therefore + recommended that you put your file transfers into a single + file, and ``.include`` it as the first thing in your + ``cmdfile`` to make it obvious that these will be run first. + + By default, ``tsshbatch`` aborts if any file transfer fails. This is unlike the case of failed commands which are reported but do *not* abort the program. The rationale' for this is that you may be doing @@ -531,6 +561,7 @@ be writable by the ID you're logging in with. + Commenting ========== @@ -875,6 +906,7 @@ ``__HOSTNAME__`` Full name of current host as passed to ``tsshbatch`` ``__HOSTNUM__`` Count of host being processed, starting at 1 ``__HOSTSHORT__`` Leftmost component of hostname as passed to ``tsshbatch`` + ``__LOGINNAME__`` User name used for remote login. For key auth, name of tsshbatch user. ``__TIME__`` Time in HHMMSS format ==================== =============================================== @@ -1152,7 +1184,7 @@ :: - $Id: tsshbatch.rst,v 1.158 2014/12/08 20:26:55 tundra Exp $ + $Id: tsshbatch.rst,v 1.159 2014/12/09 17:10:57 tundra Exp $ This document was produced with ``emacs``, ``RestructuredText``, and ``TeX Live``.