3
votes
6answers
197 views

Extracting help message from script itself

I want that my help message be extracted from the script itself. #!/bin/bash # # foo - do things # Author: John Doe <jhon@doe> # ---------------------------------------------- # SYNOPSIS # ...
4
votes
1answer
303 views

Writing command synopsis in standard man format

I am writing a script and in the usage() function I want to specify the usage. My script uses either option1 or option2 or both. One of them is mandatory. Is there a standard way to write it up?
6
votes
1answer
125 views

Where can I find out how to write a shell script that is as portable as possible? [duplicate]

Possible Duplicate: Resources for portable shell programming I want to write a shell script that is intended for further distribution. So I'd like to write it in a way that is as portable ...