![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outputting to table | amatuer_lee_3 | Shell Programming and Scripting | 3 | 05-15-2008 08:15 PM |
| Help Inserting data in mysql table | vadharah | Shell Programming and Scripting | 11 | 03-30-2008 09:26 AM |
| grep: outputting search strings | tapmas | Shell Programming and Scripting | 3 | 03-10-2008 01:58 AM |
| List grep results | slire | UNIX for Dummies Questions & Answers | 14 | 10-31-2006 08:42 AM |
| How to refine results of grep -p | priceb | Shell Programming and Scripting | 2 | 06-28-2006 05:40 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
outputting data in table from grep results
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! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
If you are not doing this primarily for the learning, you should be aware that there is a metric godzillion web log analyzer packages out there, some of them very sophisticated. The first lesson would be don't reinvent what you can download.
|
|
#3
|
|||
|
|||
|
Sadly it is for academic purposes. So downloading anything is a no sadly.
|
|||
| Google The UNIX and Linux Forums |