[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feat-Req: uniq -c delimiter should be changable
From: |
Erik Auerswald |
Subject: |
Re: Feat-Req: uniq -c delimiter should be changable |
Date: |
Sat, 17 May 2008 17:51:44 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
On Sat, May 17, 2008 at 04:36:30PM +0200, Maximilian Haeussler wrote:
>
> 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
>
> This will only print the first word of each line with the current uniq
> version though if uniq -c understood -d/-t it would print the whole
You should tell `cut' to output every field starting after the number
field inserted by `uniq':
sort textfile | uniq -c | sort -n | tail -n50 | tr -s ' ' | cut -f3- -d' '
Erik