3

I made an Unix command called macmac2unix, which converts a Word file from Mac to Unix.

How can I provide documentation for my command? I want to read about my command with man

$man macmac2unix
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
  • BTW--The name "mac2unix" is already in common use for a utility that changes line-ending characters on ordinary text files. Using that name may cause confusion... – dmckee --- ex-moderator kitten Mar 06 '09 at 16:48
  • I'd suggest changing the question to make it generic. The fact that you have "recreated" mac2unix is distracting from the point of how to create a man page. – Judge Maygarden Mar 06 '09 at 16:50

2 Answers2

3

I recommend Perl's POD format. Despite the name, you can use it outside of Perl scripts, and the pod2man command ships with OS X. It's a lot more sensible that troff. Reminds me of Markdown.

Here's an example pod document and the conversion script.

Dave Dribin
  • 5,633
  • 3
  • 28
  • 20
0

You can apparently use also DocBook to provide Documentation for an Unix command.

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697