Shell Help

In keeping with my simple approach to documentation in makefiles I do the same thing in shell scripts with this implementation:

#_# help
#_#   Print this helpful message
do_help() {
  sed -n 's/^#_#/ /p' "$0"
}

The function name follows the mode-function pattern.

In principle this approach works for any language that uses # to start a line comment, such as Python or Perl, though there are much more capable modules available in those contexts. But for shell it gives me what I need, basic functionality in simple implementation.