Update log file with date line with bash
I have a simple Mercurial update script that runs to pull the latest build to update a site. Right now I have it set to log itself but I cant get it to append its next entry at the end of the file with a date. I have some things I tried but they are not working how I would like it to.
#!/usr/bin/env bash source /home3/nwrepai1/public_html/wonunder5/config.sh echo "$TIMESTAMP Updated" >> $LOGFILE hg pull -u -b default >> $$LOGFILE
#!/usr/bin/env bash LOGFILE="/home3/nwrepai1/public_html/wonunder5/update_log.txt" TIMESTAMP=`date "+%Y-%m-%d %H:%M:%S"`
Look at the LOGFILE variable in the 'hg' line - two dollar signs. Remove one.