[99216] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: man pages

daemon@ATHENA.MIT.EDU (Tony Nugent)
Thu Nov 12 22:11:58 1998

To: filioda@videotron.com
Cc: redhat-list@redhat.com
In-Reply-To: message-id <852566BA.0054251A.00@notmtl11.videotron.com> 
	 of Thu, Nov 12 10:21:22 1998
Date: Fri, 13 Nov 1998 13:07:23 +1000
From: Tony Nugent <Tony.Nugent@usq.edu.au>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Thu Nov 12 1998 at 10:21, filioda@videotron.com wrote:

> Can someone please tell me if there is a utility that will strip the
> formatting from man pages/files and create a standard text file?

man manpage | col -b > manpage.txt

It's the col -b that is the magic ingredient.

While I'm at it...

I hope this lot is useful... I haven't used these in a while, so beware -
they'll need to be tested and modified.

Hmm... these have been taken from my old config files from a SunOS box...
the troff ones should be modified for groff, eg: "man -t $t | mpage -2 -P"
or whatever you want to do with it.

There's no error checking - they all needs a parameter, so something like
this would be useful:

[ -z $1 ] && echo "hey stupid, feed me a parameter for lunch!" && return 1



function fman() {
  man $1 | col -b > $1.man ; }
function lman () {
  tbl $1 | nroff -man | "$PAGER" ; }
function flman () {
  tbl $1 | nroff -man | col -b > $1.man ; }
function lms () {
  nroff -ms $1 | "$PAGER" ; }
function mann () {
  man $1|awk "NR<=8||(NR%66>=8&&NR%66<=60)" | col -b | uniq > $1.man ; }
function mans ()	{
  man $1|awk "NR<=8||(NR%66>=8&&NR%66<=60)" | col -b | uniq ; }
function manl ()	{
   man $1|awk "NR<=8||(NR%66>=8&&NR%66<=60)" | uniq   | "$PAGER" ; }
function pman () {
  tbl $1 | troff -t -man -Tman | lpr -t ; }

Cheers
Tony


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post