#!/usr/bin/env bash
# Example of checking whether a command exists.
# See http://stackoverflow.com/a/677212

# argument will clear path, so date command won't be found
[[ $1 == -c ]] && PATH=

PATH=$PATH hash date 2>/dev/null || {
	# echo to stderr
	>&2 echo "The date command was not found. Lucky you!"
	exit 1
}

date
