SETNEWSHOST(1) — USER COMMANDS
NAME
setnewshost − generate a string for the NEWSSERVER environment variable
SYNOPSIS
setnewshost hostname
DESCRIPTION
setnewshost generates and prints the proper value of the NEWSSERVER environment variable for the given hostname. If NEWSSERVER is set then NeWS clients will attempt to connect to the server it points to rather than the local host.
The format of the NEWSSERVER environment variable is as follows: decimal-address . port# ; hostname For example, if the host called “paper” has address 192.98.34.118, the NEWSSERVER variable should be set to “3227656822.2000;paper” so that NeWS clients will connect to the NeWS server on “paper”. setnewshost simply calculates this string and sends it to standard output. This is not its most convenient form, however. C-shell users can define the following alias:
alias snh ’setenv NEWSSERVER ‘setnewshost \!∗‘’
and System V Bourne Shell users can define the following function:
snh () {
NEWSSERVER=‘setnewshost $∗‘
export NEWSSERVER
}
Both forms let you simply type ‘snh hostname’ to set the NEWSSERVER environment variable automatically.
SEE ALSO
NeWS Manual
BUGS
The host table entry must have exactly the following format: a.b.c.d<tab>hostname.
If you use the snh alias or shell function, and the hostname you give is unknown, or you give too many or too few arguments, the NEWSSERVER variable will be trashed.
Sun Release 4.1 — Last change: 11 March 1987