bug-libtool
[Top][All Lists]
Advanced

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

Re: Darwin's uniq


From: Ralf Wildenhues
Subject: Re: Darwin's uniq
Date: Fri, 3 Dec 2004 08:44:31 +0100
User-agent: Mutt/1.4.1i

* Noah Misch wrote on Thu, Dec 02, 2004 at 08:16:08PM CET:
> On Thu, Dec 02, 2004 at 10:55:32PM +0900, Peter O'Gorman wrote:
> > Akim Demaille wrote:
> > 
> > >It turns out there are many uniq -cd, but:
> > 
> > I looked at 
> > <http://www.opengroup.org/onlinepubs/009695399/utilities/uniq.html> and 
> > that says uniq [-c|-d|-u] which means to me -c OR -d OR -u, so libtool is 
> > totally wrong using -cd in the first place :(
> 
> How about:
> 
> some_cmd | uniq -c | grep -v '[[:space:]]*1'

I don't think we can rely on character classes.  But you can easily
replace that with '     ', with SPACE and TAB within the single quotes.
(We are in the C locale, so we know what [[:space:]] contains).

I think
  some_cmd | uniq -c | grep -v '^[      ]*1[    ]'

should do, your solution breaks if there are 10 objects with the same
name.

Regards,
Ralf




reply via email to

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