I have 100 log files and I want awk to search for a given pattern between a given timestamp recursively. Log files look something like this
2010-03-24 07:00:01 ZZZZC941948879 RUFFLES 222.222.222.222 GET / - 80 - 220.181.7.113 HTTP/1.1
2010-03-24 07:00:23 ZZZZC941948879 RUFFLES 222.222.222.222 GET
Code is
awk -v "b=$date1" -v "e=$date2" '$1 >= b && $1 <= e' log.txt > output
grep -i "21things" output
I am able to search for the pattern but for single file only. Is it possible using awk command to search recursively?
Thanks for the help..!!
find ... | xargs awk ...to pass all your logs to awk-F ','when there are no commas in the log files? Please edit your question to make it more clear what you're trying to do.