How to create Man Page

View previous topic View next topic Go down

How to create Man Page

Post  Admin on Thu Dec 03, 2009 2:21 am

How to create Man Page for your own Scripts

~~~Create the manual document~~~~

# vim command.1

###This is a sample manual document . Edit it the way you want it but follow the format.###

.TH COMMAND 1

.SH NAME catapp \- A Demonstration application that finds a naughty cat.

.SH SYNOPSIS .B catapp [\-option ...]

.SH DESCRIPTION .PP \fIcatapp\fP is a complete application that
does nothing useful.

.PP It was written for demonstration purposes for http://www.linux.com

.SH OPTIONS .PP It doesn't have any, but let's pretend, to make
this template complete:

.TP .BI \-option If there was an option, it would not be -option.

.SH RESOURCES .PP catapp uses almost no resources.

.SH DIAGNOSTICS The program should provide an approximate position
where the cat ought to be found. The return value is in terms
of time, distance and direction.

.SH SEE ALSO The only other program we know with this little
functionality is the ubiquitous hello world application.

.SH COPYRIGHT COMMAND is Copyright (c) 2001-2002 GLOWFUTE.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA.

.SH BUGS There were a few bugs, but my naughty cat ate all of them.

.SH AUTHORS NATESH SHARAN and "Glowfute" my dream.
E-mail : natesh7@gmail.com
--->

~~~Format the manual ~~~

# groff -Tascii -man command.1

~~~Create backup just incase~~~
# cp command.1 command.bck

~~~Gzip it~~~
# gzip command.1

~~~place the gzip in manual folerds~~~
# cp -av command.1.gz /usr/share/man/man1

~~~output~~~
# man command
----------------------------
Ref:
http://linux.omnipotent.net/article.php?article_id=12493 Arrow
avatar
Admin
Admin

Posts : 32
Join date : 2009-09-13
Age : 31
Location : Chennai

View user profile http://linux.nsguru.com

Back to top Go down

Re: How to create Man Page

Post  Admin on Sat Mar 06, 2010 3:55 am

try this for more info
http://www.linuxhowtos.org/System/creatingman.htm
avatar
Admin
Admin

Posts : 32
Join date : 2009-09-13
Age : 31
Location : Chennai

View user profile http://linux.nsguru.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum