Manual / Man Page Entry

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Manual / Man Page Entry

Post by devarishi »

Hi,


How do we create and link a manual / man page to man command?

To illustrate my point, kindly consider the following:

Code: Select all

-bash-2.05b# ls
case.sh  scriptPid.sh
-bash-2.05b# man case.sh
No manual entry for case.sh
-bash-2.05b#
As you can see that I have two scripts. I want to display a manual / man page for the scripts. How to achieve it?

For the time being I have done this:

Code: Select all

-bash-2.05b# sh case.sh --help
No help document is available at this time.
-bash-2.05b#

That is writing related information in the script itself.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Manual / Man Page Entry

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Re: Manual / Man Page Entry

Post by devarishi »



That is a useful page but I have not been able to achive this:

Code: Select all

man myScript
When Issue a command like this:

Code: Select all

man ./myScript
it works and that too only when I am already in the directory where the myScript man page is placed.

I tried to add MANPATH in /etc/man.config but still it didn't work.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Manual / Man Page Entry

Post by VladSun »

sudo mv your-man-page.1 /usr/local/man/man1
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply