Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!ames!vsi1!altos!megadon!clp From: felps@convex.UUCP (Robert Felps) Newsgroups: comp.unix Subject: Re: org. of local man(1) pages Message-ID: <2140@megadon.UUCP> Date: 10 Oct 90 03:02:29 GMT References: <3723@zorba.Tynan.COM> Sender: clp@megadon.UUCP Lines: 50 Approved: clp@megadon.UUCP rgc@wam.umd.edu (Ross Garrett Cutler) writes: > I'm setting up local man pages on an Ultrix system. Ideally, >I would want to put them in /usr/local/man, but DEC's man(1) doesn't >handle multiple paths. And if I put them in /usr/man (e.g. localprog.1l) >you have to type "man 1l localprog" to get any info! I've tried to compile >Berkleys man.c (which does support mult. paths via MANPATH or -M), but I >could not get it to work. Please help...Ross. Here is something I setup on a heterogeneous network to handle man pages from various vendors/systems. It doesn't have to do all these checks, just check for local man pages and run nroff -man file else run man. Sorry the codes not shar'ed. ------------------------------ code starts -------------------------------- PATH=/bin:/usr/bin:$PATH HOSTNAME=`hostname` while [ -n "$*" ] do case "$1" in -*) OPTS="$OPTS $1" ;; [12345678ln]) SECTION=$1 ;; *) FILES="$FILES $1" ;; esac shift done if [ -n "$SECTION" ] then : else SECTION="*" fi for F in $FILES do # local man pages stored in NFS fs /share under subdir man if [ -f /share/man/man${SECTION}/${F}.${SECTION} ] then tbl /share/man/man${SECTION}/${F}.${SECTION} | nroff -T$TERM -man $OPTS | more else if [ "$SECTION" = "*" ] then SECTION="" fi # System V man pages are the default for the hp system if [ "$HOSTNAME" = "hp835" ] then man $OPTS $SECTION $F else # Notify user that BSD/Sun man pages are being used(net default) echo "NOTE: using man pages from \"suni\"" rsh suni man "$OPTS $SECTION $F" | more fi fi done