Re: : making man(1) to open a file

2008-09-29 Thread Raimo Niskanen
On Fri, Sep 26, 2008 at 11:59:49PM +0200, Frangois Chambaud wrote:
 Cezary Morga [EMAIL PROTECTED] writes:
 
  Dnia czwartek, 25 wrze6nia 2008, Bryan Irvine napisa3:
Next to the useful suggestions you've received so far, you can try
   
   groff -man -Tascii /path/to/manpage.X | less
  
   man -a is easier though.
  
   -B
  
  -a Display all of the manual pages for a specified section and name
  combination.  Normally, only the first manual page found is dis-
  played.
  
  You're sure that's the one?
  
  --
  Cezary Morga
  A real administrator is always logged in as root - it's CRAP
  administrators that aren't! (BOFH @theregister.co.uk)
  
  
  
 
 If the PAGER variable is set to less, you can examine the next manual
 page with :n, the previous manual page with :p and the first manual
 page again with :x.
 
 Tested with man -a disklabel:
 
 /usr/share/man/cat8/disklabel.0 (file 1 of 3) (END) - Next: 
 /usr/share/man/cat5/disklabel.0
 /usr/share/man/cat5/disklabel.0 (file 2 of 3) (END) - Next: 
 /usr/share/man/cat9/disklabel.0
 /usr/share/man/cat9/disklabel.0 (file 3 of 3) (END)

Another way is:

$ man -f disklabel
disklabel (5) - disk pack label
disklabel (8) - read and write disk pack label
disklabel, readdisklabel, writedisklabel, setdisklabel, bounds_check_with_label 
(9) - disk label management routines

$ man 8 disklabel
:
:

 
 $ uname -srm
 OpenBSD 4.3 i386
 
 -- 
 Francois Chambaud
 http://www.chambaud.org

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: : making man(1) to open a file

2008-09-29 Thread Bryan Irvine
snip

 Another way is:

 $ man -f disklabel
 disklabel (5) - disk pack label
 disklabel (8) - read and write disk pack label
 disklabel, readdisklabel, writedisklabel, setdisklabel, 
 bounds_check_with_label (9) - disk label management routines

 $ man 8 disklabel
 :

The OP's question though was related to the fact that he had net-snmp
installed which results in 2 man pages for snmpd in the same section:

$ man -k snmpd
snmpd (8) - Simple Network Management Protocol Daemon
snmpd (8) - daemon to respond to SNMP request packets.


Man's default behavior is to stop at the first page it finds in the
path, which would be OpenBSD's snmpd.  man -a (among various other
posted methods) allows you to get access to the the rest of them.

-B



Re: making man(1) to open a file

2008-09-26 Thread Cezary Morga
Dnia czwartek, 25 wrze6nia 2008, Bryan Irvine napisa3:
  Next to the useful suggestions you've received so far, you can try
 
 groff -man -Tascii /path/to/manpage.X | less

 man -a is easier though.

 -B

-a Display all of the manual pages for a specified section and name
combination.  Normally, only the first manual page found is dis-
played.

You're sure that's the one?

--
Cezary Morga
A real administrator is always logged in as root - it's CRAP
administrators that aren't! (BOFH @theregister.co.uk)



Re: making man(1) to open a file

2008-09-26 Thread Stuart Henderson
On 2008-09-26, Cezary Morga [EMAIL PROTECTED] wrote:
 Dnia czwartek, 25 wrze6nia 2008, Bryan Irvine napisa3:
  Next to the useful suggestions you've received so far, you can try
 
 groff -man -Tascii /path/to/manpage.X | less

 man -a is easier though.

 -B

 -a Display all of the manual pages for a specified section and name
 combination.  Normally, only the first manual page found is dis-
 played.

 You're sure that's the one?

Given the original problem, I'm in trouble opening net-snmp package's
snmpd(8) or snmpd.conf(5) man page, because it conflicts with the base's
snmpd's man pages, that's quite appropriate and easy-to-use. Thanks
Bryan :)

As you see here, when asking on mailing lists, you'll get more useful
answers if you give an explanation of what you want to do, rather than
just think of one way to do it and ask how to do that. 



Re: making man(1) to open a file

2008-09-26 Thread Bryan Irvine
On Fri, Sep 26, 2008 at 11:43 AM, Cezary Morga [EMAIL PROTECTED] wrote:
 Dnia czwartek, 25 wrze6nia 2008, Bryan Irvine napisa3:
  Next to the useful suggestions you've received so far, you can try
 
 groff -man -Tascii /path/to/manpage.X | less

 man -a is easier though.

 -B

 -a Display all of the manual pages for a specified section and name
combination.  Normally, only the first manual page found is dis-
played.

 You're sure that's the one?

Yeah that's the one.
Instead of halting at the first page it finds (the openbsd native) it
then brings you to the next page found once you've scrolled through
the first.

-B



Re: making man(1) to open a file

2008-09-26 Thread François Chambaud
Cezary Morga [EMAIL PROTECTED] writes:

 Dnia czwartek, 25 wrze6nia 2008, Bryan Irvine napisa3:
   Next to the useful suggestions you've received so far, you can try
  
  groff -man -Tascii /path/to/manpage.X | less
 
  man -a is easier though.
 
  -B
 
 -a Display all of the manual pages for a specified section and name
 combination.  Normally, only the first manual page found is dis-
 played.
 
 You're sure that's the one?
 
 --
 Cezary Morga
 A real administrator is always logged in as root - it's CRAP
 administrators that aren't! (BOFH @theregister.co.uk)
 
 
 

If the PAGER variable is set to less, you can examine the next manual
page with :n, the previous manual page with :p and the first manual
page again with :x.

Tested with man -a disklabel:

/usr/share/man/cat8/disklabel.0 (file 1 of 3) (END) - Next: 
/usr/share/man/cat5/disklabel.0
/usr/share/man/cat5/disklabel.0 (file 2 of 3) (END) - Next: 
/usr/share/man/cat9/disklabel.0
/usr/share/man/cat9/disklabel.0 (file 3 of 3) (END)

$ uname -srm
OpenBSD 4.3 i386

-- 
Francois Chambaud
http://www.chambaud.org



Re: making man(1) to open a file

2008-09-25 Thread Bryan Irvine
On Sun, Sep 21, 2008 at 3:33 PM, Paul de Weerd [EMAIL PROTECTED] wrote:
 On Sun, Sep 21, 2008 at 09:22:24PM +0200, L?VAI D?niel wrote:
 | Hi!
 |
 | I think there is a way for this but I can not find it in man's man :)
 |
 | Like in Linux there is a `-l' option to man(1) which opens a Local file,
 | like man -l /usr/local/man/man1/somemanpage.1. I'm in trouble opening
 | net-snmp package's snmpd(8) or snmpd.conf(5) man page, because it
 | conflicts with the base's snmpd's man pages. Now I'm reading it with
 | less, but it is less convenient :)
 |
 | Thanks for the help!

 Next to the useful suggestions you've received so far, you can try

groff -man -Tascii /path/to/manpage.X | less


man -a is easier though.

-B



making man(1) to open a file

2008-09-21 Thread LÉVAI Dániel
Hi!

I think there is a way for this but I can not find it in man's man :)

Like in Linux there is a `-l' option to man(1) which opens a Local file, 
like man -l /usr/local/man/man1/somemanpage.1. I'm in trouble opening 
net-snmp package's snmpd(8) or snmpd.conf(5) man page, because it 
conflicts with the base's snmpd's man pages. Now I'm reading it with 
less, but it is less convenient :)

Thanks for the help!

Daniel

-- 
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1



Re: making man(1) to open a file

2008-09-21 Thread Stuart Henderson
On 2008-09-21, LIVAI Daniel [EMAIL PROTECTED] wrote:
 Like in Linux there is a `-l' option to man(1) which opens a Local file, 
 like man -l /usr/local/man/man1/somemanpage.1. I'm in trouble opening 
 net-snmp package's snmpd(8) or snmpd.conf(5) man page, because it 
 conflicts with the base's snmpd's man pages. Now I'm reading it with 
 less, but it is less convenient :)

man -M /usr/local/man snmpd 



Re: making man(1) to open a file

2008-09-21 Thread Hannah Schroeter
Hi!

On Sun, Sep 21, 2008 at 09:22:24PM +0200, LIVAI Daniel wrote:
I think there is a way for this but I can not find it in man's man :)

Like in Linux there is a `-l' option to man(1) which opens a Local file, 
like man -l /usr/local/man/man1/somemanpage.1. I'm in trouble opening 
net-snmp package's snmpd(8) or snmpd.conf(5) man page, because it 
conflicts with the base's snmpd's man pages. Now I'm reading it with 
less, but it is less convenient :)

No, but in your case, you can use the option -M /usr/local/man (or -m
/usr/local/man) probably.

Kind regards,

Hannah.



Re: making man(1) to open a file

2008-09-21 Thread LÉVAI Dániel
On Sunday 21 September 2008 21.51.48 Hannah Schroeter wrote:
 No, but in your case, you can use the option -M /usr/local/man (or -m
 /usr/local/man) probably.

On Sunday 21 September 2008 21.45.59 Stuart Henderson wrote:
 man -M /usr/local/man snmpd

Argh, thanks, thanks! Sorry, I knew I read it too fast...

Daniel

-- 
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1



Re: making man(1) to open a file

2008-09-21 Thread Paul de Weerd
On Sun, Sep 21, 2008 at 09:22:24PM +0200, L?VAI D?niel wrote:
| Hi!
| 
| I think there is a way for this but I can not find it in man's man :)
| 
| Like in Linux there is a `-l' option to man(1) which opens a Local file, 
| like man -l /usr/local/man/man1/somemanpage.1. I'm in trouble opening 
| net-snmp package's snmpd(8) or snmpd.conf(5) man page, because it 
| conflicts with the base's snmpd's man pages. Now I'm reading it with 
| less, but it is less convenient :)
| 
| Thanks for the help!

Next to the useful suggestions you've received so far, you can try

groff -man -Tascii /path/to/manpage.X | less

to render the specific page. 

Cheers,

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/