Dear Gurus,
I'm in a strange situation, hence need some kind of advice or possible syntax to carry on.
let's say
current time/date is 2013-12-18, 15:58:15
I got a file something like this, which keep getting updated with respect to time.
2013-12-18, 15:56:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:57:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:58:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:59:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 14:15:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 14:23:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
So, now I will run the script then it should sum the duration in my file from (current time - 5mins)
hence it should sum
2013-12-18, 15:56:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:57:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:58:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
2013-12-18, 15:59:15,[http-3],USERNAME,SUCCESS,DURATION,815,EXECUTE,CELLS,1736
so every time if it runs then that moment it will go to file and subtract 5 mins from the current system time and only display sum of duration falling this time range(i.e. with in system date and system date - 5mins).
I would like to make in UNIX scripting.