How does man know?

Dikran Kassabian deke at ee.rochester.edu
Fri Sep 29 06:53:32 AEST 1989


In article <592 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:
>In article <11170 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>
>|  You're right, of course.
>|  Somebody thought it would be "convenient" for the command to alter
>|  its behavior based on what the implementor thought the usage would be.
>|  Thereby demonstrating once again that Earth people are stupid, stupid,
>|  stupid.
>
>  And guess what? It *is* convenient to have it work that way. If I
>need a copy of the man page in a file I can say "man foo >file" and not
>have to guess when it's waiting for me to hit return. If I want to use
>my own pager for some reason I can "man foo | mypage" and it works.

Well, yes, it is convenient.  But I can imagine other convenient methods
that would work *and* be consistant with the (sometimes elusive) UNIX
philosophy.

Think of man(1) as being a simple interface to a database, namely /usr/man.
When using this interface, it might be understood that a screen pager
will be used.  In places where any sort of indirection is required, one
might use another interface to the database.  If you have preformatted
pages in /usr/man/cat[1-8], then cat(1) is certainly an option.  If not,
then the proper selection and combination of the formatter (probably [nt]roff)
and other utilities like grep or sed could be used.

I'm not disagreeing with bill davidsen.  I like the way man(1) works,
day to day.  But I do admit that its probably 'wrong'.

      ^Deke Kassabian,   deke at ee.rochester.edu   or   ur-valhalla!deke
   Univ of Rochester, Dept of EE, Rochester, NY 14627     (+1 716-275-3106)



More information about the Comp.unix.questions mailing list