bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in uniq 2.0


From: Brancato, Mike
Subject: Bug in uniq 2.0
Date: Wed, 16 Jul 2003 11:17:46 -0400

I think I have spotted a bug in uniq.  I know 2.1 is out but it is not in
debian stable yet.  If you need the files I used to do this, let me know.
They are a couple megs in size, and one is about 200K lines.

Here is an example of it performing out of spec:

transmit:~# grep 04-00-0002287 folderlist
04-00-0002287
transmit:~# grep 04-00-0002287 allfolders
04-00-0002287
04-00-0002287
transmit:~# cat folderlist allfolders | sort | uniq -u > bad

bad should contain only what was uniq out of both of those files per my
understanding...

transmit:~# grep 04-00-0002287 bad
04-00-0002287
transmit:~# cat folderlist bad | sort | uniq -u > good
transmit:~# grep 04-00-0002287 good


I have also ruled out (or attempted to) it being a problem with another
utility.
transmit:~# cp allfolders temp
transmit:~# cat folderlist >> temp
transmit:~# sort temp | uniq -u > temp2
transmit:~# grep 04-00-0002287 temp2
04-00-0002287
transmit:~# sort temp | uniq -d > temp3
transmit:~# grep 04-00-0002287 temp3
04-00-0002287

My understanding is that using the -u and -d options should never have the
same data in each ones output.  The line 04-00-0002287 should either be a
unique line (-u) or a dupe (-d).  How can it be both?

Please reply if you have any ideas.

--
Mike Brancato




reply via email to

[Prev in Thread] Current Thread [Next in Thread]