info and man pages
Steve Adams
sma at devcom.com
Mon Apr 8 22:35:36 AEST 1991
In article <1991Apr8.011454.6181 at ms.uky.edu> paul at wolf.ccs.uky.edu (Paul Linton) writes:
>A while ago I thought I saved a posting describing the technique for
>extracting the man pages from info and placing them in the /usr/man/*
>directories. I've searched all over and cannot find the posting.
>
>Could someone please confirm or deny the ability to do this. I've
>asked the IBM reps and they claim it can't be done.
>
>Please email if you can help!
Since it of general interest, I'm posting it. This came from a document
from IBM entitled _AIXv3.1 for BSD System Administrators_, dated Sept. '90.
If you run 'catman.sh' with no args, it generates secetion 1. If you want
to generate other sections, create a directory in /tmp that has the names
of the commands/calls you want documented. For example, here's what I
did to generate section 2 :
$ mkdir /tmp/syscalls
$ cd /tmp/syscalls
$ touch `egrep ' [a-z]' /lib/syscalls.exp | awk ' { print $1 } ' | tr ''' 12'`
This was an example in the document.
-Steve
--------------------------------^^^^CUT Here^^^^^----------------------------
#!/bin/bsh
#
# usage catman.sh "path" section
# store AIXv3.1 man pages as flat text in /usr/man/cat directories
#
PATH=/bin:/usr/bin:
NAMEPATH="/bin /usr/bin /usr/ucb"
SECTION="1"
if [ -n "$1" ]
then
NAMEPATH="$1"
fi
if [ -n "$2" ]
then
SECTION="$2"
fi
for p in ${NAMEPATH}
do
for name in `ls "${p}"`
do
if [ -x "${p}/${name}" ]
then
if ( man "${SECTION}" "${name}" > /usr/tmp/"${name}")
then
mv /usr/tmp/"${name}" /usr/man/cat"${SECTION}"/"${name}"."${SECTION}"
fi
fi
done
done
--
"First we're going to cut it off, | Steve Adams - sma at devcom.com -or-
then we're going to kill it." | uunet!devcom!sma
Gen. Colin Powell | voice : 708/574-3600
More information about the Comp.unix.aix
mailing list