Skip to content

Instantly share code, notes, and snippets.

@branb
Last active August 17, 2017 17:25
Show Gist options
  • Save branb/d81f3f25c06b1319a4fd1f6fde4d70dd to your computer and use it in GitHub Desktop.
Save branb/d81f3f25c06b1319a4fd1f6fde4d70dd to your computer and use it in GitHub Desktop.
Test script for issue #3 from https://github.com/alphabetum/bash-boilerplate
#!/usr/bin/env bash
#
# _main()
#
# Usage:
# _main [<options>] [<arguments>]
#
# Description:
# Entry point for the program, handling basic option parsing and dispatching.
_main() {
printf "Argument count: $#, arguments:\n"
for arg in "$@"; do
printf " - $arg\n"
done
}
# Call `_main` after everything has been defined.
_main "${@:-}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment