Hello,
You can try something like this at the top of your script.
PHP Code:
#!/bin/bash
# define the log location.
LOGFILE=/var/log/date_check_log
# execute date command when script is run. This will continue to write the
# date each time the script is run to the last line of the log file.
/bin/date >> $LOGFILE
# Then tail the log for the last line of the file when the script was run.
/bin/tail -n1 /var/log/date_check_log
# The above should print this output to stndout. If you want to capture it in
# a file just define another log file and redirect output to it with >>.
Not sure it this helps.
Jaysunn