Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.1 KiB

  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. gsh sun /etc/mungmotd
  19. to run /etc/mungmotd on all your Suns.
  20. .P
  21. You may specify the union of two or more sets by using + as follows:
  22. gsh 750+mc /etc/mungmotd
  23. which will run mungmotd on all 750's and Masscomps.
  24. .P
  25. Commonly used sets should be defined in /etc/ghosts.
  26. For example, you could add a line that says
  27. pep=manny+moe+jack
  28. Another way to do that would be to add the word "pep" after each of the host
  29. entries:
  30. manny sun3 pep
  31. .br
  32. moe sun3 pep
  33. .br
  34. jack sun3 pep
  35. Hosts and sets of host can also be excluded:
  36. foo=sun-sun2
  37. Any host so excluded will never be included, even if a subsequent set on the
  38. line includes it:
  39. foo=abc+def
  40. bar=xyz-abc+foo
  41. comes out to xyz+def.
  42. You can define private host sets by creating .ghosts in your current directory
  43. with entries just like /etc/ghosts.
  44. Also, if there is a file .grem, it defines "rem" to be the remaining hosts
  45. from the last gsh or gcp that didn't succeed everywhere.
  46. Options include all those defined by rsh, as well as
  47. .IP "\-d" 8
  48. Causes gsh to collect input till end of file, and then distribute that input
  49. to each invokation of rsh.
  50. .IP "\-h" 8
  51. Rather than print out the command followed by the output, merely prepends the
  52. host name to each line of output.
  53. .IP "\-s" 8
  54. Do work silently.
  55. .PP
  56. Interrupting with a SIGINT will cause the rsh to the current host to be skipped
  57. and execution resumed with the next host.
  58. To stop completely, send a SIGQUIT.
  59. .SH SEE ALSO
  60. rsh(1C)
  61. .SH BUGS
  62. All the bugs of rsh, since it calls rsh.
  63. Also, will not properly return data from the remote execution that contains
  64. null characters.