LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Create a Manual / Man Page for a Script or Tool (http://www.linuxquestions.org/questions/linux-general-1/create-a-manual-man-page-for-a-script-or-tool-828664/)

Hi_This_is_Dev 08-26-2010 02:18 PM

Create a Manual / Man Page for a Script or Tool
 
Hi,


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

To illustrate my point, kindly consider the following:


Code:

-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:

-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.

rikijpn 08-26-2010 02:33 PM

If it's an extensive manual you may want to better write an info file.
If it's very short, you should just put it in the script...

Anyway, a quick google search returned this , it's kinda long, so you may want to read a short page I wrote some time ago.

If you are writing a very serious/technical manual, you should probably search for "groff" which is the formatting language used in man pages.


All times are GMT -5. The time now is 05:01 PM.