value. If it doesn't exist or is null, print the error message. If no error message is given, print parameter null or not set... OK"
else
echo "ERRORS"
fi
If there is an error we can create another function to echo the error out to the screen:
name_error()
# name_error
... ny of the main scripting blocks begin. Notice the error message statement; the function error_msg is used, and all arguments passed to the function error_msg are just echoed out with a couple of bleeps.
en
echo "Usage: `basename $0` filename" >&2
# Error message to stderr.
exit $E_NOARGS
# Returns 65 as exit status of script (error code).
fi
filename=$1
if [ ! -f "$filename" ]... .
then
echo "File $filename not found!" >&2 # Error message to stderr.
exit $E_NOTFOUND
fi
if [