To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.funOpen lugnet.off-topic.fun in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Fun / 910
909  |  911
Subject: 
Re: Unix geeks
Newsgroups: 
lugnet.publish, lugnet.off-topic.fun
Date: 
Thu, 18 Feb 1999 12:32:51 GMT
Reply-To: 
lpien@iwantnospam.ctp.+Spamless+com
Viewed: 
41 times
  
Jasper Janssen wrote:

On Wed, 17 Feb 1999 19:40:12 GMT, lehman@javanet.com (Todd Lehman)
wrote:

  cat /etc/words | awk '{print substr($0,1,3)}' | sort | uniq -c | sort

Does uniq mess up the sorting? I don't see why you have to pipe it
through sort twice otherwise. I mean, Yick. sort is a slow program
anyway, so doing it twice where once would do :)

Jasper

sort it once to get the word prefixes in order. uniq -c to get you a
count of the prefix occurrences prepended to the prefix after removeing
dups, sort it again to put the prefixes in order by number of
occurences.

If you really were the geek you claim you were :-), you would have known
the two sorts are for different reasons and there's no way using this
approach to avoid both. However, wc may be useful here if properly
applied. Have to think.

and if you haven't rewritten sort on your box to be faster, what kind of
geek ARE you? :-)

--
Larry Pieniazek    http://my.voyager.net/lar
Stop the FDIC from spying on us! Go to
http://www.defendyourprivacy.com and sign the petition.
For me: No voyager e-mail please. All snail-mail to Ada, please.
- Posting Binaries to RTL causes flamage... Don't do it, please.
- Stick to the facts when posting about others, please.
- This is a family newsgroup, thanks.



Message has 1 Reply:
  Re: Unix geeks
 
(...) I'd have known what uniq did, yes. I don't, my box doesn't have it, nor TAFM, and I don't want it. :) (...) A lazy one? Jasper (26 years ago, 19-Feb-99, to lugnet.publish, lugnet.off-topic.fun)

Message is in Reply To:
  Re: Unix geeks
 
(...) Does uniq mess up the sorting? I don't see why you have to pipe it through sort twice otherwise. I mean, Yick. sort is a slow program anyway, so doing it twice where once would do :) Jasper (26 years ago, 18-Feb-99, to lugnet.publish)

58 Messages in This Thread:



















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR