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