*BSD News Article 67726


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!news.uoregon.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!tank.news.pipex.net!pipex!blackbush.xlink.net!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Unix Newbe needing help! Ascii man pages??
Date: 4 May 1996 21:23:00 GMT
Organization: Private BSD site, Dresden
Lines: 35
Message-ID: <4mghrk$mkb@uriah.heep.sax.de>
References: <318A1BCA.4EEB@mainelink.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

Gary Chrysler <tcg@mainelink.net> wrote:

> Is there a way to extract ALL man pages to pure ascii??
> 
> Currently I do:
> 	man -a <cmd> |& col -b > ~/asciiman/<cmd>.man
> 
> I would like to automate this and extract all man pages to <cmd>.man

I don't really know why you would do this (all formatting information
will get lost, and the man pages will look really boring then), but
just in case:

	prefix=/home/myman
	for section in 1 2 3 4 5 6 7 8 9
	do
		mkdir -p ${prefix}/${section}
	done
	cd /usr/share/man
	for file in man*/*
	do
		file=`echo $file | sed -e 's/\.gz$//'`
		gzcat $file | tbl | nroff -mandoc |\
			col -b > ${prefix}/${file}.man
	done

This will format the system manual.  You will have to do the same for
/usr/local/man/man* and /usr/X11R6/man/man* if you care.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)