I need to write a shell script to redirect output of a java program to a log file which I can do by
java abc > logfile.log
However, I need to create logfile.log
with the current date appended, ensuring that only one such file is created for a day, otherwise the output is appended to the existing file with the current date.
How can this be done in the shell script?