My template for when I need to do bash scripts with both a “human” and a “machine” interface:
Template for interactive bash scripts:
- supports command line options with values
- prompts for any missing parameters/arguments
https://gist.github.com/hugocf/8147608
Update 2016-06-02: Moved to repo @hugocf/scripts