The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Outputting to table amatuer_lee_3 Shell Programming and Scripting 3 05-16-2008 12:15 AM
Help Inserting data in mysql table vadharah Shell Programming and Scripting 11 03-30-2008 01:26 PM
grep: outputting search strings tapmas Shell Programming and Scripting 3 03-10-2008 04:58 AM
List grep results slire UNIX for Dummies Questions & Answers 14 10-31-2006 11:42 AM
How to refine results of grep -p priceb Shell Programming and Scripting 2 06-28-2006 09:40 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-12-2008
Chillspark Chillspark is offline
Registered User
  
 

Join Date: May 2008
Posts: 2
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!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0