Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Providing documentation for a Unix command

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
like image 900
Léo Léopold Hertz 준영 Avatar asked Jan 31 '26 08:01

Léo Léopold Hertz 준영


1 Answers

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.

like image 154
Dave Dribin Avatar answered Feb 03 '26 01:02

Dave Dribin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!