C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Creating a man page entry? Posted by digitalrana on 6 Sept 2006 at 5:09 AM
Hi all,
I've recently migrated to linux (ubuntu). One of the interesting things i noticed when i set up my gcc and everything was that i could use the "man" command to view a manual page for any of the predefined functions.

I was wondering, when I write a program, is there any way to have a man page for my program? I'm guessing it would require my program to have some sort of installation procedure which would set up the man page along with my program.

Any ideas?

Report
Re: Creating a man page entry? Posted by stober on 6 Sept 2006 at 10:25 AM
:
: Any ideas?
:
:


learn to use google "how to create a man page"

http://anaturb.net/create_man_p.htm
Report
Re: Creating a man page entry? Posted by akalexi312 on 7 Sept 2006 at 5:49 AM
you need to understand how man pages are written first.
Try "beginning Linux programming book" if you have else here
are tips/hints to take you in right direction.

man pages are troff programmed text files stored in gunzipped compresed format in directory /usr/man/man{section_number}


write a man page file using troff extensions with name convention
{command_name}.{man_page_section_number}

ex : your command name is miyaoo then write man page called miyaoo.1
then test it using groff -Tascii -man miyaoo.1
then it will display man page to you !! if satisfied then..

gzip miyaoo.1 to get miyaoo.1.gz and copy it to /usr/man/man1/
path ;

type man miyaoo and voila there you have the man page!!!

[ you need to learn troff/groff commands first ]

Cheers
Anand Kulkarni


: Hi all,
: I've recently migrated to linux (ubuntu). One of the interesting things i noticed when i set up my gcc and everything was that i could use the "man" command to view a manual page for any of the predefined functions.
:
: I was wondering, when I write a program, is there any way to have a man page for my program? I'm guessing it would require my program to have some sort of installation procedure which would set up the man page along with my program.
:
: Any ideas?
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.