UNIX grouping

Hi guys,

I am a complete newbie to unix and have been tasked with creating a script to group the following data (file) by hourly slots so that I can count the transactions completed within the peak hour.
I am not sure how to group data like this in unix. Can anyone please help?

Here is an example of a line
13 Sep 2013 11:47:13,929 [user:11111,ip:xx.xx.xx.xx] Servicing GET request for /store/111/departments

based on this I need to group data over the 24 hour period 00-01, 02-02 etc and then count how many times the departments url was hit within that hour. Is this possible?

Please try this

awk 'BEGIN{print "Hour","Hits"} /departments$/ {a[substr($4,1,2)]++} END{for(i in a){print i, a}}' infile