#!/bin/sh - # # Copyright (c) 1993 # The Regents of the University of California. All rights reserved. # # %sccs.include.redist.sh% # # @(#)tocrc 8.2 (Berkeley) 05/05/94 # tmp=/tmp/toc$$ trap "rm $tmp ; exit" 2 3 15 : tocx files for all sections and everything else if [ ! -f tocx8 ]; then for x in 1 2 3 4 5 6 7 8; do /usr/libexec/getNAME -t `cat man$x` | sed \ -e 's/.s-2//g' \ -e 's/.s-1//g' \ -e 's/.s0//g' \ -e 's/.s+1//g' \ -e 's/ *.- */: /' \ -e 's/ *$/./' \ -e 's/.TH.* //' \ -e 's/@g@//' \ -e 's/@G@//' \ > tocx$x done fi : permuted index and toc files cat tocx* cshcmd > /tmp/cattoc ptx -r -t -b break -f -w 108 -i ignore /tmp/cattoc ptxx for x in 1 2 3 4 5 6 7 8; do grep '^intro' $tmp sed \ -e '2,${' \ -e '/^intro/d' \ -e '}' \ -e 's/ .*://' \ -e 's/.$//' \ -e 's/([^)]*) /" "/' \ -e 's/.*/.xx "&"/' \ -e '/""/d' \ $tmp tocx$x \ >toc$x done exit