Apologies straight away for bad-styled-question-and-heading.....learning unix and its command these days, m trying to figure out a solution for below scenario :
Lets say i have a log file which looks like :
01-02-1988 12:00:00 I start 01-02-1988 12:00:01 I start 01-02-1988 12:00:02 I start 01-02-1988 12:00:03 I start 01-02-1988 12:00:04 I start 01-02-1988 12:00:05 I start 01-02-1988 12:00:06 I start 01-02-1988 12:00:07 I start 01-02-1988 12:00:08 I start 01-02-1988 12:00:09 I start 01-02-1988 01:00:10 I start
and i take a time bracket from user for which he wants to see the status.To filter out all the process, i can do :
egrep $usr_time log.txt
But is there any way i can do the same for a particular time period, like
awk, can match the value for me for
$2 here...but how to compare it for seconds(ss in hh:mm:ss)???
Like for example : assume i want records from
12:00:01 - 12:00:06, so basically what i would need is to extract 3rd value from
: delimiter and compare it....how can this be achieved....please help!!!!