Welcome to WebmasterWorld Guest from 54.198.93.179

Forum Moderators: bakedjake

Message Too Old, No Replies

Can get uniq to work as intended

     
9:34 pm on May 17, 2007 (gmt 0)

5+ Year Member



I'd like to know how many people visited a specific part of my website during the month of april so i use this:

cat access_log  grep /Apr/  grep multimedia 

This works fine.

But i want to filter out duplicates based on IPs, so i can get number of unique visitors.

So i add this:

cat access_log  grep /Apr/  grep multimedia [b]  uniq -w 15 -i [/b]

But it simply will not give me unique lines based on the first 15 characters.

So whats the problem?

Thanks in advance.

3:23 pm on May 19, 2007 (gmt 0)

5+ Year Member



a simple question, but apparently no simple answer :(
5:27 pm on May 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure -- it seems to work for me. But if you just want the number of visitors, try it like this:

grep '/Apr/' access_log grep multimedia cut -f1 -d ' ' sort -u wc -l

6:58 pm on May 19, 2007 (gmt 0)

5+ Year Member



Thanks, that worked exactly as intended. Strange that uniq doesnt work...
 

Featured Threads

Hot Threads This Week

Hot Threads This Month