![]() |
Egrep on linux timestamp
Hi
I want to egrep or a grep in the squid log file .. from this time 1287483952.440 to '1287483452.440 , how can i do it .Thanks |
Not sure about grep but you could do it with sed or awk pretty simply:
Code:
sed -n '/1287483952\.440/,/1287483452\.440/p' file |
no ya .. time doesn't work .. it brings a output of old time as well
|
Maybe the log entries are not sorted? Anyway, you can easily extract lines whose time is between two specific timestamps using numeric comparison in awk:
Code:
awk '$1 >= 1287483452.440 && $1 <= 1287483952.440' squid.log |
| All times are GMT -5. The time now is 06:19 PM. |