Re: Man Pages in Text?

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 05/21/04


Date: Fri, 21 May 2004 20:08:02 GMT

On Fri, 21 May 2004 13:34:39 -0500, Ed Morton <morton@lsupcaemnt.com> wrote:
>
>
>
>
> Alan Connor wrote:
>
><snip>
>> So I guess I'll have to write a sed script to remove the junk
>
> In case it helps, here's my junk-removal sed script I've been using for
> years to clean up man pages:
>
> sed -e 's/.^H//g' \
> -e 's/^M//g' \
> -e 's/^[//g' \
> -e 's/^G//g' \
>
> Regards,
>
> Ed.
>

Yes indeed, Ed. This is my lucky day, eh?

The only thing it misses (on MY manpages) is a a <AD> (reverse video in
less; ed (the *other* ed :-) with the "l" command reported it to be \255)

Ascii tells me this is:

ASCII 10/13 is decimal 173, hex ad, octal 255, bits 10101101: meta--

It's used as a hyphen before the $ on a lot of lines. Ascii usually
give a ^[A-Z] for non-printing characters, but not here. Its tables
don't go above 127 either.

I can live with it, but it would it would be nice to get rid of them too.
I tried 's/\\255//' but it didn't work. Any ideas?

No clue in man{ed,sed,vi,regex}.

Thanks, Ed.

AC



Relevant Pages

  • Re: Man Pages in Text?
    ... Alan Connor wrote: ... > So I guess I'll have to write a sed script to remove the junk ...
    (comp.unix.questions)
  • Re: 1st line w/regex only
    ... Alan Connor wrote: ... the sed script. ... or sed -V or sed --version as a command line. ... Also which Linux distro ...
    (comp.unix.shell)
  • Re: 1st line w/regex only
    ... > Alan Connor wrote: ... > about the need to save your work to a temp file and copy it back into ... > the sed script. ... A distro you've never heard of that is basically a whittled down Debian. ...
    (comp.unix.shell)