> 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
Never trust an operating system you don't have sources for. ;-)