i have a scheduled task running for every 30 mins in ubuntu. i’m writing the log to a file called sh_tsk.log and using >> so that it doesn’t overwrite. But what i want is to separate logs using dates. i.e today’s log should be in a file named after today’s date and tomorrow’s log should be in a file named after tomorrow’s date. i know i can use touch keyword to create a file. But what i don’t know is how do i create the file using current date?
i have a scheduled task running for every 30 mins in ubuntu. i’m writing
Share
Use
datecommand: