From a28db5f03ecef95d7d2dd2f437b8fd47b7bf8e0d Mon Sep 17 00:00:00 2001 From: Ayrton Date: Wed, 10 Jan 2024 22:42:28 -0700 Subject: [PATCH] Initial Commit --- template.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 template.sh 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!"