From cefdbe4537c24d38b60f78489097c2615ee8f4d9 Mon Sep 17 00:00:00 2001 From: James Pannacciulli Date: Sat, 16 Sep 2017 21:45:25 -0700 Subject: add a couple more examples to README --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cfdc2f..b71b29c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,22 @@ Instructions parssh --help ``` -- Export functions and variables from local Bash session to remote hosts and execute: +- Run simple command on listed servers from list: ``` -parssh "$(declare -f functions; declare -p variables); functions" < serverlist +parssh "md5sum /bin/bash" < SERVERLIST +``` + +- Export FUNCTIONS and VARIABLES from local Bash session to remote hosts from +SERVERLIST and execute: +``` +parssh "$(declare -f FUNCTIONS; declare -p VARIABLES); FUNCTIONS" < SERVERLIST +``` + +- Export FUNCTIONS and VARIABLES from local Bash session to remote hosts from +SERVERLIST and execute with a concurrency of 35, saving and displaying output +along with the commands and meta-data as a header in the 'PROJECT_NAME.out' +and 'PROJECT_NAME.err' files: +``` +parssh -35 -C -t PROJECT_NAME \ + "$(declare -f FUNCTIONS; declare -p VARIABLES); FUNCTIONS" < SERVERLIST ``` -- cgit v1.2.3