To view a man page on the Web, use a URL of this form:
http://www.nmt.edu/tcc/cgi/manweb.cgi?p=P&s=S&x=X
where is the
page name, P is
the optional section name, and S is the optional suffix string, as
described in Section 2, “The path names of Xman pages”.
Here are some examples. The first column shows the part of
the URL after the “?”; the
second column shows the resulting path name relative to
/usr/share/man/. Note that all
special characters must be escaped using the convention
that a character with hexadecimal code is represented as “xx%”.
xx
| Arguments | Path |
|---|---|
p=ls |
man1/ls.1.gz
|
p=Magick%2B%2B%2Dconfig |
man1/Magick++-config.1.gz
|
p=math%2Eh&s=0p |
man0p/math.h.0p.gz
|
s=3&p=Thread%3A%3AQueue&x=pm
|
man3/Thread::Queue.3pm.gz
|
If any of the supplied arguments are invalid, or if the
specified man page does not exist, the script will
display an error page. In the latter case, mail will also
be sent to webmaster@nmt.edu so that broken
links can be repaired.
One potential problem is that the set of man pages on the
server will be different from the set of pages available on
clients. Since this script is primarily for basic man
pages that exist everywhere, we'll deal with that if and
when it becomes a problem. One possible solution is to
duplicate the set of client man pages on infohost, and add an option to select the client
or server set.