Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!devcom!sma From: sma@devcom.com (Steve Adams) Newsgroups: comp.unix.aix Subject: Re: info and man pages Summary: generating manual pages Message-ID: <1991Apr08.123536.35399@devcom.com> Date: 8 Apr 91 12:35:36 GMT References: <1991Apr8.011454.6181@ms.uky.edu> Reply-To: sma@devcom.com (Steve Adams) Followup-To: comp.unix.aix Organization: Devcom Mid-America, Inc., Chicago, IL Lines: 61 In article <1991Apr8.011454.6181@ms.uky.edu> paul@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@devcom.com -or- then we're going to kill it." | uunet!devcom!sma Gen. Colin Powell | voice : 708/574-3600