Results 1 to 2 of 2
im having problems with this:
i have a file which contains some data about internet hits log:
123.123.123 Mon Feb 23 2008
123.123.123 Mon Feb 23 2008
"
"
i ...
- 05-01-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 13
Script Help
im having problems with this:
i have a file which contains some data about internet hits log:
123.123.123 Mon Feb 23 2008
123.123.123 Mon Feb 23 2008
"
"
i can prompt the user to type a time period so i can store it in a vaiable so it can compare it to the file. then it can increment the number of hits a certain file has in the given time period. but i cant seem to compare the IP addresses and output the number of unique IPs.
Heres part of my script:
echo "Enter Period "
read PERIOD
grep "$PERIOD" *.hits | wc -l
i have also tried using awk to solve the same problem but im pretty stuck
any help!?!
Thanks all
- 05-03-2008 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Well, how are you trying to compare and count the unique IP addresses? You have to do some of your work first, then we'll help you get it working.


Reply With Quote