Use date with touch to create new file with date based name
I am using CRON to create a new, blank file, every minute, in a specific location on my web server. After web searching, and reading man pages, I get the impression that the following command is supposed to work:
touch /home/mydomain/var/folder/attachments/`date +%H%M`.txt
This should give me a new file with a file name that is the current hour and minute.
However, when executed, the CRON mailer reports:
touch /home/mydomain/var/folder/attachments/`date +
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
So, it looks like shell is seeing the plus (+) sign as an EOF
Obviously, nothing get created.
What would be the easiest, single line command to create an empty file, at a given location, with a time based file name?