[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
uniq -c output
From: |
Christopher Ness |
Subject: |
uniq -c output |
Date: |
Sat, 17 Apr 2004 00:18:11 -0400 (EDT) |
Hi,
I did not expect `uniq -c` to output multiple values for non-uniq input
based on the location of the input in the file.
address@hidden nesscg]$ uniq --version
uniq (coreutils) 4.5.3
I've attached the file in question. My script uses this line on it.
address@hidden nesscg]$ /bin/cat /tmp/mail-abuse/todays-list.txt |
/bin/awk '{ print $6;}' | /usr/bin/uniq -c
8 vlan270-029-228.maconline.McMaster.CA[130.113.29.228]:
4 vlan180-034-124.maconline.McMaster.CA[130.113.34.124]:
7 vlan270-029-228.maconline.McMaster.CA[130.113.29.228]:
I think the above is wrong. The first and last should be rolled into one
entity and printed as 15 hits on that string. At least thats what I
thought `uniq` was going to do but apparently it is aware of the location
of the strings.
I have had to call `sort` to work around this. Is this the intended
output. If so please put a note about this in the man page for `uniq`
Thanks,
Chris Ness
todays-list.txt
Description: Text document
- uniq -c output,
Christopher Ness <=