(I generally don’t set the IFS as recomended)
set -e #exit immediately if a simple command exits with a non-zero status
set -u #treat unset variables as an error when performing parameter expansion
set -o pipefail #exit status of last non-zero exit code is returned
tempfile="$(/bin/mktemp)"
strips of everything before the last “/”
scriptname="${0##*/}"
#find our current host
fqdn="$(/bin/hostname)"
#strip off everything after the first "."
host="${fqdn%%.*}"
datetime="$(/bin/date "+%Y%m%dT%H%M%S")"