Changes to shell template
This commit is contained in:
parent
2b9da46949
commit
961b7864ad
@@ -18,9 +18,20 @@ set -o nounset # Treat unset variables as an error
|
||||
|
||||
# Check for empty argument
|
||||
if [ -z "${1:-}" ]; then
|
||||
arg="undefined"
|
||||
arg="undefined"
|
||||
echo "Required Argument Missing"
|
||||
#exit 1
|
||||
else
|
||||
arg=$1
|
||||
arg=$1
|
||||
fi
|
||||
|
||||
.
|
||||
# Log Echo: send output to screen and specified file
|
||||
# Usage: logecho "Log Message"
|
||||
# define logfile and path to enable logging to file
|
||||
logfile=
|
||||
logecho() {
|
||||
echo "${1}"
|
||||
if [[ ! -z "${logfile}" ]]; then
|
||||
echo "${1}" >> "${logfile}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user