# perform any post script completion tasks
printf "\n%s" "Cleanup Tasks ..."
printf "\n%s" "Performing Task ($(date +%I:%M:%S)) ..."
echo -en "\rWatching file $(tput bold)$1$(tput sgr0) ...\n"
past_modify_time=$(gdate -d "@$(gstat -c '%Y' "$1")" '+%T')
# sleep for 100 milliseconds
new_modify_time=$(gdate -d "@$(gstat -c '%Y' "$1")" '+%T')
[[ "$past_modify_time" != "$new_modify_time" ]] && perform_task
echo -e "requires a file as an argument"