[Wolves] Linux man pages

chris procter chris-procter at talk21.com
Thu Nov 15 10:46:07 GMT 2007


I take your man1 converter and raise you a man1 to 9 converter :)

for SECTION in `seq 1 9`
do
    for PAGE in `ls /usr/share/man/man${SECTION}/*.gz`
    do
        BASE=`basename ${PAGE} .${SECTION}.gz`
        man -P cat $BASE > ${BASE}.${SECTION}.txt
    done
done

(not tested)

still doesn't deal with man3p and some of the other odd man directories but it'll do the main ones

I always write shell variables in uppercase. It must be the fortran programmer in me :)

chris (a different one)


----- Original Message ----
From: John Kennedy <skebi69 at gmail.com>
To: Wolverhampton Linux User Group <wolves at mailman.lug.org.uk>
Sent: Thursday, 15 November, 2007 9:56:52 AM
Subject: Re: [Wolves] Linux man pages

Chris,
I think the only way you will get them in text format (Unless you
 mirror a web 
site that has them listed already) will be to actually convert them all
 with 
a script. The command to convert a man page to text format is:
man <command> | col -b > <command>-man.txt
I would suggest something like:

for i in `find /usr/share/man/man1 -name \*.gz
do
BASE=`basename $i .1.gz`
man $BASE | col -b > $BASE
done

of something similar.

John

On Thursday 15 November 2007 09:41:29 Chris Maggs wrote:
> I want to make a database (MySQL) of them so I can access them in
 work
> (or from anywhere really!) where I don't have access to Linux. I'll
 be
> putting them on a public webpage along with other hints and tips for
> Linux users (new and experienced!) as I pick them up.
>
> Visitors will also be able to add their tips and so forth. Basically
 I
> want to try and make a Linux Help page. I know there's loads out
 there
> but the more coverage we get the better in my eyes!
>
> C
>
> On 15/11/2007, ArchLinuxUser dick_turpin <dick_turpin at archlinux.us>
 wrote:
> > On 15/11/2007, Chris Maggs <chrismaggs at gmail.com> wrote:
> > > Does anyone know where I can download all the Linux man pages in
 plain
> > > text format - preferably in an archive if possible!  I know I
 could do
> > > "man command > command.txt" but this would take bloody ages!
> >
> > Chris
> >
> > Not seen anyone ask this question yet. "Why?"
> >
> > Not wanting to be a party pooper but you should have the 'man'
 pages
> > for any install you have unless of course there's not one written
 and
> > why anyone would want to read a 'man' page for something that's not
> > installed is beyond me.
> >
> > Is there not a book Linux Bible? or something from Oreilly?
> >
> > --
> > Regards
> >
> > Dick Turpin
> > http://www.cannon-linux.co.uk
> >
> > Arch Linux is an independent i686-optimized community distribution
 for
> > intermediate and advanced Linux users. Utilising a Rolling Release
> > System packages are regularly updated and an ISO release is just a
> > snapshot to the stable packages at that time. So there's no need
 for a
> > fresh install the command 'pacman –Syu' upgrades the whole
 system.
> >
> > _______________________________________________
> > Wolves LUG mailing list
> > Homepage: http://www.wolveslug.org.uk/
> > Mailing list: Wolves at mailman.lug.org.uk
> > Mailing list home:
 https://mailman.lug.org.uk/mailman/listinfo/wolves



-- 
Regards,
John Kennedy
Dedicated Support Engineer
jkennedy at novell.com
UK - +44 (0) 1344 326 054
UK Mobile - +44 (0) 7802 357 030
US - 1 801 861 5340

Novell, Inc.
SuSE Linux Enterprise 10
Your Linux is ready
http://www.novell.com/linux


_______________________________________________
Wolves LUG mailing list
Homepage: http://www.wolveslug.org.uk/
Mailing list: Wolves at mailman.lug.org.uk
Mailing list home: https://mailman.lug.org.uk/mailman/listinfo/wolves





      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 



More information about the Wolves mailing list