Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Sep 2002 17:54:00 -0700 (PDT)
From:      "M.T." <mbsd@pacbell.net>
To:        Lee <sfpnkpu@scfn.thpl.lib.fl.us>
Cc:        David Banning <david@skytrackercanada.com>, questions@FreeBSD.ORG
Subject:   Re: how to get an ascii man page
Message-ID:  <20020902175205.K69871-100000@atlas.home>
In-Reply-To: <Pine.GSO.3.95.1020902183037.21449D-100000@scfn>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2 Sep 2002, Lee wrote:

> On Mon, 2 Sep 2002, David Banning wrote:
>
> > I would like to do a "man ls > lsmanpagefile" but I find that is has
> > a lot of control characters in the text. Any idea how I can lose it?
> >
> > I really just want to search a man page for a specific term, so I don't have
> > to read the whole man page looking for the area I am interested in.
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >
> sed can produce a readable, printable manpage-file:
> % man <whatever> | sed s/.\CTRL-V CTRL-H//g > <whatever>.txt
>  has sed remove any charater followed by CTRL-H , and the
>  CTRL-H itself. The CTRL-V escapes the CTRL-H on the command
>  line(no space between the two).
> the output could be piped to grep <keyword> for further
> filtering.

Or use "col -b".  See col(1) -- it was created for this very purpose :)

  $.02,
  /Mikko


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020902175205.K69871-100000>