Operating System - HP-UX
1833779 Members
2166 Online
110063 Solutions
New Discussion

get a command's man page to show in "man -k ..."

 
Marc Ahrendt
Super Advisor

get a command's man page to show in "man -k ..."

man navicli
NOTE: works OK
echo $MANPATH
...:/opt/Navisphere/man
man -k nvaicli
NOTE: reports nothing
catman -w
man -k nvaicli
NOTE: still reports nothing
file /opt/Navisphere/man/cat1/navicli.1
navicli.1: English text

any idea how to get "man -k navicli" to work?


hola
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: get a command's man page to show in "man -k ..."

Have you run catman yet so that /usr/share/lib/whatis has been created?
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: get a command's man page to show in "man -k ..."

Hi:

If you just updated '/etc/MANPATH', did you export it before running 'catman' ?

Regards!

...JRF...
DCE
Honored Contributor

Re: get a command's man page to show in "man -k ..."


navicli does not appear to be a standard unix command.

Only those man pages found in the directories listed in the MANPATH variable are found by the mna command.

If you have added man pages to the system, you must add the directory where the new man pages are located to the MANPATH variable. The simplest way to do this is to add the new directory to /etc/MANPATH, which is accessed by /etc/profile when a user logs on.

Then log off/on to make the change effective (or add the directory to your current MANPATH and export it)

HPUX SysAdm
Frequent Advisor

Re: get a command's man page to show in "man -k ..."

Isn't that a typo in your search i.e. man -k navicli instead of >nvaicli<

cheers!
Marc Ahrendt
Super Advisor

Re: get a command's man page to show in "man -k ..."

i understand the importance of /etc/MANPATH and as stated initially $MANPATH is set properly. also, a mentioned by James and DCE i did make sure that $MANPATH was set before running "catman -w". also, Sandeep you are correct in that i just made a typo in my posting but not when testing on my server.

i know little regarding man pages, but i have been successful in the past getting the "whatis" DB updated. however not sure why it fails to update with "navicli", which i referenced above is on my server as a text file.

man -k navicli
navicli: nothing appropriate
man navicli
...works
catman -w
stdin: not in compressed format
stdin: not in compressed format
man -k navicli
navicli: nothing appropriate


any further thoughts? i know the "stdin" output from the "catman -w" command are not related since i was getting those before addressing this issue (adding /opt/Navisphere/man to $MANPATH)
hola
A. Clay Stephenson
Acclaimed Contributor

Re: get a command's man page to show in "man -k ..."

Sorry, I completely overlooked your "catman -w" command in your initial posting. I am wondering if there is something a little bit wrong with this particular man page so that catman can't quite parse it. You might resort to the simple expedient of directly editing whatis (it's just a text file).
If it ain't broke, I can fix that.
DCE
Honored Contributor

Re: get a command's man page to show in "man -k ..."


If my understanding of catman-w /whatis is correct, the catman -w command creates entries the whatis database by using the description information at the beginning of the man page.

Does your text file meet this requirement? You can look at an HP command to get the format.....
James R. Ferguson
Acclaimed Contributor

Re: get a command's man page to show in "man -k ..."

Hi (again) Marc:

Given that you indicate that you already have a 'whatis' database, either remove it and do:

# catman -w

...OR, do:

# catman -m

Regards!

...JRF...
Marc Ahrendt
Super Advisor

Re: get a command's man page to show in "man -k ..."

clay, your option has been my last resort ...i will tweak the DB file if i cannot find a way to reformat the file /opt/Navisphere/man/cat1/navicli.1 in a way that "catman" will understand it.

DCE, i think this is the heart of my problem ...that the file /opt/Navisphere/man/cat1/navicli.1 has no tags/flags that typically "catman" looks for to build off of.

James, you do not have to remove the DB file if you use "catman -w" ...which is what i have been using all along

if there is not a way to convert the file /opt/Navisphere/man/cat1/navicli.1 into some format that is understood by "catman" then i guess my solution will be to directly edit the DB file ...however this will force me to run future DB updates using "catman -m" else my hack/tweak gets lost on future "catman -w" use.
hola