Writing manual pages

To really do your scripts' users a service, consider writing a fully-fledged manual page for the man reader tool, in a format such as mandoc: https://mandoc.bsd.lv/.

In addition to trying myscript -h or myscript --help, many users will try man myscript in their search for help. Why not impress them with a full page of readily-available documentation, showing a detailed explanation of what the tool is for, some usage instructions, and even some examples? You can even convert the manual page to be published on the web using mandoc, for those users more inclined to use the web to search for answers to a problem.

Don't underestimate the importance of writing comments, help, and documentation even just for yourself in the ...

Get Bash Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.