SUMMARY: local man pages organization (script)

From: Mark Bergman (
Date: Tue Feb 11 1997 - 18:00:06 CST

Here's the script I ended up using to create the links. Once it's
complete, you'll have to join the MANPATH line and the following
line in your /usr/share/ file.

WARNING! The script is a very quick hack, with no error checking. I
really can't see how it could be destructive, but it might make a
mess if your environment is distinctly different.
#! /bin/sh
for dir in /usr/local/man/*
        /bin/echo "$dir...\c"
        if [ -d $dir ]
                /bin/echo "..\c"
                name=`echo $dir | sed -e "s%.*\/%%" -e "s%\(...\)%\1-local%`
                cfname=`echo $name | sed -e "s/^...//"`
                /bin/echo "..\c"
                ln -s $dir /usr/share/man/$name
                /bin/echo "..\c"
                /bin/echo ",$cfname\c" >> /usr/share/man/
                /bin/echo "...complete.\n"
                /bin/echo "not a directory...skipped.\n"
/bin/echo "\n\n" >> /usr/share/man/
catman -w &

Mark Bergman				
PHRI			212-578-0822
Unix System and Network Administrator

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:46 CDT