uniq is very useful to know the unique IP addresses that visit your website.

Typically when users download SpamCheetah.iso they download around 7
files and they look at a whole
bunch of stuff in the website.

But when it comes to business/sales, I am only interested in knowing
how many different individuals download
my software.

For that even if we consider NAT, so far I have not had the same IP
downloading twice anytime.

So assume that your company has 300 employees and one NAT public IP,
then I will see only one unique IP even
when a 100 people download my software.

But this is not the way website statistics work. We often think that
people come from different geographies and that
is mostly correct.

Anyway now coming back to the tip, this is the line I use

$ grep -h .iso access.log*|cut -d' ' -f1|uniq
65.55.105.141
74.6.18.246
65.55.105.138
65.55.105.146
66.249.68.136
77.251.255.144
66.249.68.136
80.57.9.214
95.16.116.224
65.168.58.2
80.57.190.3
74.6.18.246
114.127.246.34
74.6.18.246
72.30.142.162
88.11.40.44
74.204.0.4
72.30.142.162
93.128.134.88
72.30.142.162
65.55.105.141
67.195.110.190
80.57.9.214
95.16.116.224
65.168.58.2
80.57.190.3
74.6.18.246
114.127.246.34
74.6.18.246

You can run geoiplookup on them in a shell script to figure out the
countrywide distribution.

This is the number of downloads in the present week which is not yet over.

$ grep -h .iso access.log*|cut -d' ' -f1|uniq|wc -l
      29

Too bad. I have to work on getting more downloads.

Anyway man uniq also shows these flags:
    -c, --count
              prefix lines by the number of occurrences

       -d, --repeated
              only print duplicate lines

       -D, --all-repeated[=delimit-method]
              print all duplicate lines
delimit-method={none(default),prepend,separate} Delimiting
              is done with blank lines.

       -f, --skip-fields=N
              avoid comparing the first N fields

       -i, --ignore-case
              ignore differences in case when comparing
-Girish
-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com
_______________________________________________
To unsubscribe, email [email protected] with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to