[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What do we have that will save a manpage as we see it on-screen



On Fri, Oct 01, 2021 at 05:21:54PM -0400, Gene Heskett wrote:
> What I wanted on dead tree, was exactly what I see on screen.
> With the manpage markup gobbled up, leaving only the text I see on screen 
> when I type man 9 filename.

So you wanted to print a man page on paper, but you wanted it *NOT* to
look exactly like it does on the screen.  You wanted the text only,
without the boldface and other markup.  Which is, again, *NOT* what you
see normally.  (What you see normally includes boldface and other markup.)

man ls | lp

should have done this for you.  There's no need for an intermediate file.
When the output of man isn't a terminal (e.g. when it's a pipe to lp),
man produces only the ASCII text, without any markup.

At least, that's how the man command works on Debian.  This is not the
case on proprietary Unixes.  There, the man command often includes the
markup when writing to non-terminals.  And if you look at the byte stream,
you see things like

_^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^He

because that's how you get underlining on a line or dot matrix printer.


Reply to: