aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 985262591e422c65db494802ff7aa0df954c2035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
parssh: Parallel SSH orchestration in a Bash session.
=====================================================

Instructions
------------

- Source pars.sh to your Bash session:

```bash
. pars.sh
```

- Run *parssh* function for usage information:

```bash
parssh --help
```

- Run simple command on listed servers from list:

```bash
parssh "md5sum /bin/bash" < SERVERLIST
```

- Export FUNCTIONS and VARIABLES from local Bash session to remote hosts from
SERVERLIST and execute:

```bash
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:

```bash
parssh -35 -C -t PROJECT_NAME \
  "$(declare -f FUNCTIONS; declare -p VARIABLES); FUNCTIONS" < SERVERLIST
```