I have a log file with the following input:
X , ID , Date, Time, Y
My goal is to get the number of times ID has a TIME that's after 09:00:00 each DATE.
That would give me two output. one is the number of days ID has been late, and secondly, the day and time this ID has been late .
I've started as such:
sort -t ','* -k 3,3 -k 4,4* file.log* # this will sort the file according to the DATE field as well as the Time fileld.
I'm stuck for the last 30 min to find a way to get the first line of each day (logically it'll be the earliest as i've sorted by date/time previously) once i know how to do this, i'll be able to compare time and proceed..
Can any one help ?
i looked into sort - u and uniq -f3 though i didnt get far with it..
CentOS mailing list