On Fri, Oct 16, 2009 at 8:16 AM, Roshan Mathews <[email protected]> wrote:
> On Fri, Oct 16, 2009 at 7:50 AM, Girish Venkatachalam
> <[email protected]> wrote:
>> uniq is very useful to know the unique IP addresses that visit your website.
>>
> Uniq(1):
> Discard all but one of successive identical lines from INPUT (or stan-
> dard input), writing to OUTPUT (or standard output).
>
>
> _successive_ as it says above ... hence uniq(1) is often used with sort(1).
Rosh,
How right you are?
Cool.
I must remember to use sort with it. In my case it is not very
relevant since my
site is not so busy that I get multiple downloaders at the same time.
Then I would
have naturally arrived at sort.
But this is an old UNIX idiom that left my attention.
I shall cover sort separately in another tip.
Now that I am about it, I will mention two things.
a) sort -nr is frequently used. $ du -hsc | sort -nr
descending sort of file/dir sizes. IOW sort
numericlaly(-n) sorts
in desending(reverse order -r) order
b) sort's notion of "sorting" may not agree with yours. So
you have to
either use cut to sort a specific field numerically or
rarely alphabetically...
-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