More than likely it is your use of set
. That will assign 'today', '=' and the output of the date
program to positional parameters (aka command-line arguments). You want to just use C shell (which you are tagging this as "bash", so likely not), you will want to use:
today=`date +%Y-%m-%d.%H:%M:%S` # or whatever pattern you desire
Notice the lack of spaces around the equal sign.
You also do not want to use &
at the end of your statements; which causes the shell to not wait for the command to finish. Especially when one relies on the next. The find
command could fail because it is started before the mkdir
.