bug-coreutils
[Top][All Lists]
Advanced

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

Re: Feat-Req: uniq -c delimiter should be changable


From: Eric Blake
Subject: Re: Feat-Req: uniq -c delimiter should be changable
Date: Sat, 17 May 2008 08:49:32 -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 Maximilian Haeussler on 5/17/2008 8:36 AM:
|
| Let's say I only want the 50 most common lines of a file:
| cat textfile | sort | uniq -c | sort -n | tail -n 50 | tr -s ' ' | cut -f2

Unrelated to your report, but this is a useless use of cat.  Why not:

sort < textfile | uniq -c ...

- --
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

iEYEARECAAYFAkgu8HwACgkQ84KuGfSFAYCT0QCdHo9+eVgsK6XUrHjMuyHe3xkD
mVMAoNd7Sdskvz7IhNmPcejguvneCeH5
=ed2u
-----END PGP SIGNATURE-----




reply via email to

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