I have created a linux bash script directory structure which is all working fine except from the date is not showing in the logfile which is created!
Here is the code for the logfile
touch $1/logfile.log
CURRENTDATE=`date +"%Y-%m-%d %T"`
printf "Created by: $USER\nDate/Time Created: $CURRENTDATE" > $1/logfile.log
The message from the command line I receive is: CURRENTDATE: Command Not Found, then when opening the logfile.log created the correct USER appears but there is no date.
Any Advise? Thanks