3

I made a 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
2
  • 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... Commented Mar 6, 2009 at 16:48
  • 1
    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. Commented Mar 6, 2009 at 16:50

2 Answers 2

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 than troff. It reminds me of Markdown.

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

Sign up to request clarification or add additional context in comments.

Comments

0

You can apparently also use DocBook to provide documentation for a Unix command.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.