commit a28db5f03ecef95d7d2dd2f437b8fd47b7bf8e0d Author: Ayrton Date: Wed Jan 10 22:42:28 2024 -0700 Initial Commit diff --git a/template.sh b/template.sh new file mode 100644 index 0000000..69bd43c --- /dev/null +++ b/template.sh @@ -0,0 +1,46 @@ +#!/bin/bash +############################################################ +# Help # +############################################################ +Help() +{ + # Display Help + echo "Add description of the script functions here." + echo + echo "Syntax: scriptTemplate [-g|h|v|V]" + echo "options:" + echo "g Print the GPL license notification." + echo "h Print this Help." + echo "v Verbose mode." + echo "V Print software version and exit." + echo +} + +############################################################ +############################################################ +# Main program # +############################################################ +############################################################ + +# Set variables +Name="world" + +############################################################ +# Process the input options. Add options as needed. # +############################################################ +# Get the options +while getopts ":hn:" option; do + case $option in + h) # display Help + Help + exit;; + n) # Enter a name + Name=$OPTARG;; + \?) # Invalid option + echo "Error: Invalid option" + exit;; + esac +done + + +echo "hello $Name!"