bug-coreutils
[Top][All Lists]
Advanced

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

Re: unable to remove duplicate lines from the attached file


From: Eric Blake
Subject: Re: unable to remove duplicate lines from the attached file
Date: Fri, 13 Jun 2008 06:54:33 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Joseph Butler on 6/13/2008 6:37 AM:
|
| Hello Tech Support:

We're not really paid tech support, just volunteers...

| For some reason, I'm unable to remove duplicate lines using the uniq
utility.

Reread 'uniq --help', particularly this bit:

| Note: 'uniq' does not detect repeated lines unless they are adjacent.
| You may want to sort the input first, or use `sort -u' without `uniq'.

But I don't see any duplicate lines in your test file to begin with:

$ wc < test03
~   7611   22949  121649
$ uniq test03 | wc
~   7611   22949  121649
$ sort -u test03 | wc
~   7611   22949  121649

On a quick inspection, I did see some close matches ("at sea " vs. "at
sea"), but as the trailing space means those aren't identical, and you
didn't explain which lines you thought were duplicates, I don't see any bug.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhSbgkACgkQ84KuGfSFAYBZtwCfZa6SSqy48GmUB880knz3iNLX
qCgAoIk8XeD0IDZJDjLyc/BhYsiHolf0
=aDId
-----END PGP SIGNATURE-----




reply via email to

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