sorting (using sort/sed/awk/whatever)
S. Luke Jones
luke at mtung.ATT.COM
Fri Aug 3 05:04:19 AEST 1990
Here's a brain teaser for you UNIX tool-and-shell gurus out there.
My news-reader presents articles in the order they appear in
my .newsrc file. How can I sort it by subject? (I don't want to do
it by hand because it seems like there's two or three new newsgroups a
day.)
If I just sort (no options) my .newsrc I get something like
comp.lang.c++:
comp.zillions.of.other.things:
comp.std.c++:
sci.random.stuff:
rec.c++:
talk.bizarre:
talk.politics.oop.c++:
and so forth. The articles on (C++) are not clumped together the way
I want them. But because the c++ appears at a different depth in the
name of each newsgroup,
sort -t. +5 -6 +4 -5 +3 -4 +2 -3 +1 -2 .newsrc > puke
won't work either. What am I missing? Surely there's got to be an
easy way to do this. Suggestions?
--
Luke Jones, luke at mtung.att.com, ...!att!mtung!luke, phone 201/957-2733
Notworked Software Laboratory, Computer Systems Division, Bell Laboratories
Disclaimer: the opinions are mine but I had to sign away my rights to them.
Quote: "System Test? That's for *idiots*!" (paraphrasing Insp. H. Calahan)
More information about the Comp.unix.questions
mailing list