I need to write a script where the particular string(alphanumeric) should be searched inside the file with every hour for whole day. And the search should not contain the previous hour results.
Time stamp format inside file is "2014-02-17 17:00:01"
The below command will give the out put for the whole day count but i need every hour count.
grep "recFileChg:true" *.tmp | awk -F "|" '{print $4, $29}' | cut -d "," -f1,2 | awk -F "[" '{print $1, $2}'
I would be very much appreciated if somebody can help me on this.