Hi all. I'm a real unix newbie and looking for some help on a shell scripting problem. I'm going the longest ways around everything but I'm getting there.
My next problem however has me stumped.
I have set up a program that takes inputs from a user for a particular month and year (and stores them in variables) then searches a list of hits files for these values.
The hits files all contain information on webpage visits, so the hits for adventure.html are stored in adventure.hits.
These hit files are made up of several columns:
103.45.155.82 Tue Nov 15 03:23:42 GMT 2006
My script so far will search all of those hits files for the specified month and year, so Nov 2006 for example, then outputs the results to a temporary file.
This temporary file records all the columns for the records matching the search criteria as well as listing the filename in the first column. like this:
adventure.hits:103.45.155.82 Tue Nov 15 03:23:42 GMT 2006
I need to now output a table to the terminal that shows data under headings like this:
Page Name - Hits - Unique Hits
adventure.hits 58 18
sports.hits 107 12
Any ideas how to go about this?
Thanks!