Show scriptHelp if no parameters given. Redirect unknown parameters.

This commit is contained in:
Asif Bacchus 2018-09-19 15:44:32 -06:00
parent 8be32fc01d
commit 71f7644175

View File

@ -56,11 +56,11 @@ logFile="$scriptPath/${scriptName%.*}.log"
# if no parameters provided, then show the help page and exit with error
if [ -z $1 ]; then
# show script help page
scriptHelp 1
scriptHelp
fi
# use GetOpts to process parameters
while getopts 'l:' PARAMS; do
while getopts ':l:' PARAMS; do
case "$PARAMS" in
l)
# use provided location for logFile