User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 391,566 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,631 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:
Views: 3565 | Replies: 1
Reply
Join Date: May 2005
Posts: 1
Reputation: danny_xmas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
danny_xmas danny_xmas is offline Offline
Newbie Poster

News web page statistics - my first bash script

  #1  
May 14th, 2005
Hi there, I'm new to this forum and to bash scripting.

I am required to write a bash shell script that processes statistical information for a website. Each web page has a "hits" file associated with it, eg. index.hits. Each line of a hits file records a single access of that web page, including IP address and access time. Example line:

123.123.123.123 Mon Feb 7 22:02:35 GMT 2005

My script will process this information and present it in a table. I can't figure out how I would find if there where more than one "hit" from the same IP?

Can anyone give me a little help?

Many Thanks

Dan
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Posts: 21
Reputation: vgersh99 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
vgersh99's Avatar
vgersh99 vgersh99 is offline Offline
Newbie Poster

Re: web page statistics - my first bash script

  #2  
May 18th, 2005
use awk's associative arrays index by the first field [ip address].
vlad
+-----------------------------------+
| #include <disclaimer.h> |
+-----------------------------------+
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Shell Scripting Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 10:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC