Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site gatech.UUCP
Path: utzoo!watmath!clyde!akgua!gatech!spaf
From: spaf@gatech.UUCP (Gene Spafford)
Newsgroups: net.news.map,net.sources
Subject: Scripts for organization list
Message-ID: <5086@gatech.UUCP>
Date: Thu, 22-Mar-84 10:01:23 EST
Article-I.D.: gatech.5086
Posted: Thu Mar 22 10:01:23 1984
Date-Received: Fri, 23-Mar-84 20:57:25 EST
Organization: The Clouds Project, School of ICS, Georgia Tech
Lines: 36

I've had numerous requests for the scripts I used to produce the list
of Usenet sites sorted by organization name.  Rather than continue to
send out individual copies, I'm posting them here (net.news.map) and in
net.sources.  If I already mailed you a copy, you might wish to compare
what I mailed you with this posted version -- I have fixed a couple of
minor bugs since I mailed out copies to the first few requesters.

To produce the list, you need to run the following 1 line shell script
in a directory containing the most recent version of the map from
net.news.map:
awk -f list.awk usa.* eur.* can.* aus.* | sort -bdf +1 +0 -1

What follows is the contents of the "list.awk" script:
$1 == "Name:"		{name = $2
		 	 flag = 0
			 next}

$1 ~ /Org/ 		{len = index ($0, ":") + 2
			 org = substr ($0, len, length($0) - len + 1)
			 flag = 1
			 next}

$1 ~ /Con/		{printf "%10s\t%s\n", name, org
			 org = ""
			 flag = 0
			 next}

flag == 1		{len = index ($0, $1)
			 org = org " " substr ($0, len, length($0) - len + 1)
			 next}

-- 
Off the Wall of Gene Spafford
The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332
CSNet:	Spaf @ GATech		ARPA:	Spaf.GATech @ CSNet-Relay
uucp:	...!{akgua,allegra,rlgvax,sb1,unmvax,ulysses,ut-sally}!gatech!spaf