using tee command to create time specific log files
I am using 'tee' command to redirect the log of my shell program into a file.
My requirement is to append the current date and time with the file name.
sh sample.sh | tee logfile_$date.txt #sample command
Output Log File:
logfile_2013-08-22-14.txt #yyyy-mm-dd-hh format
How can i achieve it ?
No comments:
Post a Comment