A Question About the 'man' display

A Question About the 'man' display

Post by see_es_see_i_41 » Fri, 20 Apr 2001 14:56:47



Actually, I am posting from my class account.  But in order NOT to receive some paranoiac
messages like "do your own homework!", I have modified my user info such that it does not
look like from a university student.  I am being honest. (The paranoiac people would still
say, "see, this guy pretends that what he is asking here does not have to do with his
homework!")

I am interested in Unix. I notice, that when I run 'man something', there at the left bottom
of the screen it tells you the percentage of the man page that is currently displayed on the
screen. Before the percentage number, for example, 18%, there is always a string like
"manaaxaTn".  What makes me feel weird is that you won't get the same string over there even
if you run the same thing, e.g., 'man ls', more than once.

I believe this has to do with the design of the UNIX operating system.  Can anybody tell me
the mechanism behind the changing string?  Does it have any meaning?

Thanks a lot.

 
 
 

A Question About the 'man' display

Post by Terran Melconi » Fri, 20 Apr 2001 16:47:45




>modified my user info such that it does not look like from a
>university student.  I am being honest. (The paranoiac people would

I wouldn't worry about it so much.  I think most of the people I see
posting here tend to be able to tell whether or not a question is a
homework question by what the question says, not where it comes from.
There's just something distinctive about homework questions.

Quote:>I am interested in Unix. I notice, that when I run 'man something',
>there at the left bottom of the screen it tells you the percentage of
>the man page that is currently displayed on the screen. Before the
>percentage number, for example, 18%, there is always a string like
>"manaaxaTn".  What makes me feel weird is that you won't get the same

First of all, you should note that man itself is not displaying the
man page.  It is calling an external program, such as `less` or `more`
to perform this function.

The string displayed in the corner is most likely the file name being
displayed.  Man pages are often generated on the fly from nroff
source.  The result of this formatting might be stored in a temporary
file... the name of which is the file name you are seeing.  Each time,
the name of the temporary file is different, thus leading to a
different name being displayed.

Different operating systems behave differently.  Some, for example,
will save a copy of the formatted man page for a certain amount of
time every time it is viewed, thus avoiding the need to regenerate it
each time.  Others will pass the text to the pager on stdin, such that
the pager never knows the file name (if there was even a temporary
file at all), or will give options or environment variables so as to
set the string displayed to the name of the man page.

 
 
 

A Question About the 'man' display

Post by Mike Hal » Fri, 20 Apr 2001 23:43:13



> I have modified my user info such that it does not
> look like from a university student.

How nice of you to prevent us from replying directly to you.
Now _we_ get spammed.

Quote:> I believe this has to do with the design of the UNIX operating system.

No, not at all.

Quote:>  Can anybody tell me the mechanism behind the changing string?  

I don't see it happening, but that doesn't mean anything.

Here's what's going on:
  - 'man' is just a command, probably a script.
  - it sounds like it's formatting the manual page into a temporary file.
  - it's calling a pager to show you the contents of the temp file.
  - he pager is showing you the file name and the percent.

Want it to go away?  Try changing to a different pager.
There's 'more', and 'less', and 'pg', depending on the system.
Set and export PAGER (PAGER=less), depending on the system.
Or read up on the pager you currently have, and see if there
are options to have it not show the file name.

Quote:> Does it have any meaning?

Not really.

--
Mike Hall

 
 
 

1. 'info' displays hyphens in man pages as '^i' instead of '-'

When I execute the info command for topics found in man
pages (e.g. "info diald-examples") info fires up and
displays the *man-page* information. But, it displays all
hyphens ('-') for words that have been broken at the end of
a line as '^i's. This is true in text mode at the console
and under X using rxvt or xterm.

Can anyone enlighten me on why this is happening and if
there is a fix? I am running Debian 2.0.

---- Ken

2. pppd hangs up immediatly

3. quirk: man won't man "w" won't "w" and no telnet

4. Measuring RAM speed from Linux?

5. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

6. php/mysql error: cannot load libphp4.so

7. man can't format new man pages - can't find DESC file

8. Can micq work behind a socks5 proxy server

9. 'man -k' & 'apropos' fail

10. A minimal 'man' page for the 'ip' command

11. all man pages show '-' chars as '???'

12. man pages for 'fread' & 'fwrite'

13. Problem with 'man' and 'groff'