#!/bin/env bash set -euo pipefail EXIT_SUCCESS=0 EXIT_FAILURE=1 ## insert functions here... print_help() { echo "Commands:" echo " ./bash_template.sh arg1" echo " ./bash_template.sh help" } main() { case "${1}" in "help") print_help exit ${EXIT_SUCCESS};; "none") echo "No argument given!" print_help exit ${EXIT_FAILURE};; "*") echo "Invalid argument!" print_help exit ${EXIT_FAILURE};; } main ${1-none}