Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / perl5 / eg / g / gsh.man
1 .\" $RCSfile: gsh.man,v $$Revision: 4.1 $$Date: 92/08/07 17:20:22 $
2 .TH GSH 8 "13 May 1988"
3 .SH NAME
4 gsh \- global shell
5 .SH SYNOPSIS
6 .B gsh
7 [options]
8 .I host
9 [options] 
10 .I command
11 .SH DESCRIPTION
12 .I gsh
13 works just like rsh(1C) except that you may specify a set of hosts to execute
14 the command on.
15 The host sets are defined in the file /etc/ghosts.
16 (An individual host name can be used as a set containing one member.)
17 You can give a command like
18
19         gsh sun /etc/mungmotd
20
21 to run /etc/mungmotd on all your Suns.
22 .P
23 You may specify the union of two or more sets by using + as follows:
24
25         gsh 750+mc /etc/mungmotd
26
27 which will run mungmotd on all 750's and Masscomps.
28 .P
29 Commonly used sets should be defined in /etc/ghosts.
30 For example, you could add a line that says
31
32         pep=manny+moe+jack
33
34 Another way to do that would be to add the word "pep" after each of the host
35 entries:
36
37         manny   sun3 pep
38 .br
39         moe             sun3 pep
40 .br
41         jack            sun3 pep
42
43 Hosts and sets of host can also be excluded:
44
45         foo=sun-sun2
46
47 Any host so excluded will never be included, even if a subsequent set on the
48 line includes it:
49
50         foo=abc+def
51         bar=xyz-abc+foo
52
53 comes out to xyz+def.
54
55 You can define private host sets by creating .ghosts in your current directory
56 with entries just like /etc/ghosts.
57 Also, if there is a file .grem, it defines "rem" to be the remaining hosts
58 from the last gsh or gcp that didn't succeed everywhere.
59
60 Options include all those defined by rsh, as well as
61
62 .IP "\-d" 8
63 Causes gsh to collect input till end of file, and then distribute that input
64 to each invokation of rsh.
65 .IP "\-h" 8
66 Rather than print out the command followed by the output, merely prepends the
67 host name to each line of output.
68 .IP "\-s" 8
69 Do work silently.
70 .PP
71 Interrupting with a SIGINT will cause the rsh to the current host to be skipped
72 and execution resumed with the next host.
73 To stop completely, send a SIGQUIT.
74 .SH SEE ALSO
75 rsh(1C)
76 .SH BUGS
77 All the bugs of rsh, since it calls rsh.
78
79 Also, will not properly return data from the remote execution that contains
80 null characters.