NEWSSERVERSTR(1) — USER COMMANDS
NAME
newsserverstr − generate a string for the NEWSSERVER environment variable
SYNOPSIS
newsserverstr [ hostname ] [ portnumber ]
DESCRIPTION
newsserverstr generates and prints the proper value of the NEWSSERVER environment variable for hostname and portnumber. If NEWSSERVER is then set to this value, NeWS clients will attempt to connect to hostname at portnumber. The default value for hostname is the current host, and the default value for portnumber is 2000. The two arguments can be specified in either order on the command line.
The format of the NEWSSERVER environment variable is as follows:
decimal-address . port# ; hostname
For example, if the host called myhost has address 192.98.34.118, the NEWSSERVER variable could be set to 3227656822.2000;myhost to enable NeWS clients to connect to the X11/NeWS server on myhost at port 2000.
newsserverstr simply calculates the string and sends it to standard output; you should then set the environment variable NEWSSERVER to the value returned by newsserverstr.
EXAMPLE
C-shell users can define the following alias:
alias snh ’setenv NEWSSERVER ‘newsserverstr \!∗‘’
and Bourne Shell users can define the following function:
snh () {
NEWSSERVER=‘newsserverstr $∗‘
export NEWSSERVER
}
Both the above forms let you simply type ‘snh hostname’ to set the NEWSSERVER environment variable automatically.
SEE ALSO
BUGS
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: 15 June 1989