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

use awk's associative arrays index by the first field [ip address].

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.