Currently I have something like this:
./player_script |grep "videoname" >> log.log &
The output of player_script
shows when a video starts and ends, grep
then takes only certain video file names and puts them into log.log
.
So log.log
will look something like this:
video <videoname> is playing now
video <videoname> ended
video <videoname> is playing now
video <videoname> ended
... and so on.
What I need is the timestamp of when the file starts and ends on each new line, in this format:
Feb 28 15:35:32 video <videoname> is playing now
I also need the date on the log file: log2012-02-29.log
.
This is being run on Solaris 5.8 & 5.9.