uuhosts that works with January 1984 mod.map.uucp postings

H. Morrow Long [Systems Center] long at ittvax.UUCP
Tue Jan 15 14:50:42 AEST 1985


	Uuhosts worked very well with the data in mod.map.uucp but I
	found one misfeature in the way it interacted with certain
	site's information.  Any information after the first blank line
	in a site description was not presented to the user in inquiry
	mode.

	I also couldn't help adding a 'paging' mode for those site
	description that overflow a screen.  This feature is also
	helpful if the user requests information on multiple sites,
	ala 'uuhosts ittvax wxlvax'.

	Original behavior:
	------------------

Script started on Mon Jan 14 21:07:34 1985
% uuhosts seismo
UUCP mail path for seismo:
seismo       	allegra!seismo!%s

UUCP mail host information for seismo:
#Name			seismo
#System-CPU-OS		Vax 11/780, 4.2BSD
#Organization		Center for Seismic Studies
#Contact		Raleigh F. Romine, Rick Adams
#Electronic-Address	seismo!postmaster
#Telephone		(703) 276-7900
#Postal-Address		1300 N. 17th St., Suite 1450, Arlington, VA 22209
#Latitude-Longitude	38 53 30N 77 03 30W
#Remarks		A.k.a seismo.ARPA
#Written-by		Rick Adams 12/11/84
#
# 10Mb Pronet
CSS-RING = {seismo, hugo, janus, sdccis, css-sun}(LOCAL)


USENET news host information for seismo:
% uuhosts ittvax
UUCP mail path for ittvax:
ittvax       	%s

UUCP mail host information for ittvax:
#Name			ittvax
#System-CPU-OS		Vax 11/780, 4.2bsd
#Organization		ITT Advanced Technology Center
#Contact		Edward T. Keegan, H. Morrow Long, Suzanne Cascella
#Electronic-Address	ittvax!etk, ittvax!long, ittvax!cascella
#Telephone		(203) 929-7341
#Postal-Address		1 Research Drive, Shelton, CT 06497
#Latitude-Longitude	41 12N 73 08W
#Remarks		
#Written-by		H. Morrow Long, 12/3/84
#
# UREP (Unix RSCS - IBM Remote Spooling Communications Subsystem) links
# Class of machines accessable via ITT network
ITTNET = { ittvax, idcvm, pnanim, pnavms, atcvm, atcmvs, facevm, stlvm, ndcvm, ndcuts, idcuts } (LOCAL)


USENET news host information for ittvax:
% ^D
script done on Mon Jan 14 21:08:27 1985

	New behavior:
	-------------

Script started on Mon Jan 14 23:36:22 1985
% uuhosts seismo
UUCP mail path for seismo:
seismo       	allegra!seismo!%s

UUCP mail host information for seismo:
#Name			seismo
#System-CPU-OS		Vax 11/780, 4.2BSD
#Organization		Center for Seismic Studies
#Contact		Raleigh F. Romine, Rick Adams
#Electronic-Address	seismo!postmaster
#Telephone		(703) 276-7900
#Postal-Address		1300 N. 17th St., Suite 1450, Arlington, VA 22209
#Latitude-Longitude	38 53 30N 77 03 30W
#Remarks		A.k.a seismo.ARPA
#Written-by		Rick Adams 12/11/84
#
# 10Mb Pronet
CSS-RING = {seismo, hugo, janus, sdccis, css-sun}(LOCAL)

# local calls
seismo	bdmrrr(DIRECT), elsie(DIRECT), grendel(DIRECT), hadron(DIRECT),
	nbs-amrf(DIRECT), netword(DIRECT), prcrs(DIRECT), prometheus(DIRECT),
	rlgvax(DIRECT), trwatf(DIRECT), vrdxhq(DIRECT)

# these are in LaJolla, CA, but we have a leased line, so treat them as local
seismo	helios(DIRECT), s3sun(DIRECT)

# long distance
seismo	allegra(DEMAND), bellcore(DEMAND), brl-bmd(DEMAND), cbosgd(DEMAND),
	decvax(DEMAND), gatech(DEMAND), hao(DEMAND), harpo(DEMAND),
	ihnp4(DEMAND+HIGH), lamont(DEMAND), mcnc(DEMAND), mcvax(DEMAND),
	mit-erl(DEMAND), nsc(DEMAND), noao(DEMAND), philabs(DEMAND),
	presby(DEMAND), princeton(DEMAND), raisun(POLLED), rna(DEMAND),
	scgvaxd(DEMAND), turtlevax(DEMAND), ucadmus(DEMAND), ulysses(DEMAND),
	unr70(DEMAND), usna(DEMAND), uw70(DEMAND), vortex(DEMAND),
	whuxlk(DEMAND), wucs(DEMAND), yquem(DEMAND), zehntel(DEMAND)

seismo	ut-sally(DEDICATED), rochester(DEDICATED), cmcl2(DEDICATED),
	nta-vax(DEDICATED), lbl-csam(DEDICATED), harvard(DEDICATED),
	sri-iu(DEDICATED), uwvax(DEDICATED), utah-cs(DEDICATED),
	umcp-cs(DEDICATED), mordor(DEDICATED), topaz(DEDICATED),
	tardis(DEDICATED+1)

# These sites are on the arpanet and don't speak uucp. However, the news
# software makes it look like they talk uucp, so seismo fakes it for them
seismo	brl-tgr(DEDICATED), brl-vgr(DEDICATED), brl-vld(DEDICATED),
	nlm-mcs(DEDICATED), nlm-vax(DEDICATED), cmu-cs-k(DEDICATED),
	cmu-cs-p(DEDICATED)

# We can not reliably connect to these sites, but we do get through on occasion
seismo	uf-cgrl(WEEKLY), duke(WEEKLY)

# We poll these sites even if we don't have traffic for them
mcnc	seismo(DAILY/2)
uw70	seismo(DAILY)
hadron	seismo(DAILY/2)
vortex	seismo(DAILY/4)
grendel	seismo(DAILY/4)
prcrs	seismo(DAILY)


USENET news host information for seismo:
% uuhosts ittvax
UUCP mail path for ittvax:
ittvax       	%s

UUCP mail host information for ittvax:
#Name			ittvax
#System-CPU-OS		Vax 11/780, 4.2bsd
#Organization		ITT Advanced Technology Center
#Contact		Edward T. Keegan, H. Morrow Long, Suzanne Cascella
#Electronic-Address	ittvax!etk, ittvax!long, ittvax!cascella
#Telephone		(203) 929-7341
#Postal-Address		1 Research Drive, Shelton, CT 06497
#Latitude-Longitude	41 12N 73 08W
#Remarks		
#Written-by		H. Morrow Long, 12/3/84
#
# UREP (Unix RSCS - IBM Remote Spooling Communications Subsystem) links
# Class of machines accessable via ITT network
ITTNET = { ittvax, idcvm, pnanim, pnavms, atcvm, atcmvs, facevm, stlvm, ndcvm, ndcuts, idcuts } (LOCAL)

#
# Internal 9600 baud RS-232 links within ITT-ATC
#
ittvax	ittsc1(LOCAL), ittsc2(LOCAL), ittuvax(LOCAL), wxlvax(LOCAL)

# local calls
ittvax	bunker(DIRECT), yale(DIRECT)

# long distance
ittvax	allegra(DEMAND), dcdvaxb(DEMAND), dcdwest(DEMAND),
	decvax(DEMAND), duke(DEMAND), eosp1(POLLED), ittral(DEMAND),
	lbl-csam(DEMAND), psuvax1(DEMAND), purdue(DEMAND), qubix(DEMAND),
	qumix(EVENING), research(DEMAND), sii(DEMAND), tmmnet(DEMAND),
	twg(DEMAND), uf-cgrl(DEMAND)

# We poll these sites even if we don't have traffic for them
dcdwest		ittvax(HOURLY)
decvax		ittvax(HOURLY*2)
duke		ittvax(DAILY)
mit-eddie	ittvax(DAILY)
psuvax1		ittvax(DAILY)
tmmnet		ittvax(HOURLY*2)
twg		ittvax(DAILY)
wxlvax		ittvax(HOURLY/2)


USENET news host information for ittvax:
% ^D
script done on Mon Jan 14 23:36:59 1985


	Here's the diff:
	================


*** /tmp/,RCSt1025776	Mon Jan 14 23:30:09 1985
--- uuhosts.sh	Mon Jan 14 23:26:14 1985
***************
*** 1,6
  #!/bin/sh
  #
! # $Header: uuhosts.sh,v 1.2 85/01/14 18:10:43 root Exp $
  # $Log:	uuhosts.sh,v $
  # Revision 1.2  85/01/14  18:10:43  root
  # Changed path to uucp mail paths.

--- 1,6 -----
  #!/bin/sh
  #
! # $Header: uuhosts.sh,v 1.3 85/01/14 23:21:43 long Exp $
  # $Log:	uuhosts.sh,v $
  # Revision 1.3  85/01/14  23:21:43  long
  # Changed awk script to ignore blank lines in a site description.
***************
*** 2,7
  #
  # $Header: uuhosts.sh,v 1.2 85/01/14 18:10:43 root Exp $
  # $Log:	uuhosts.sh,v $
  # Revision 1.2  85/01/14  18:10:43  root
  # Changed path to uucp mail paths.
  # 

--- 2,13 -----
  #
  # $Header: uuhosts.sh,v 1.3 85/01/14 23:21:43 long Exp $
  # $Log:	uuhosts.sh,v $
+ # Revision 1.3  85/01/14  23:21:43  long
+ # Changed awk script to ignore blank lines in a site description.
+ # When indexing, hostmarker is used as the delimiter for the end of an entry
+ # as well as the beginning.
+ # Added paging in inquiry mode for those sites where /usr/ucb/more is found.
+ # 
  # Revision 1.2  85/01/14  18:10:43  root
  # Changed path to uucp mail paths.
  # 
***************
*** 177,189
  	sinside = 1; soutside = 2; state = soutside;
  	hostmarker = "'"$hostmarker"'";
  }
- /^$/ {
- 	if (state != sinside)
- 		next;
- 	state = soutside;
- 	printf ("%s\t%s\t%d\t%d\n", hostname, FILENAME, firstline, NR);
- 	next;
- }
  $1 == hostmarker {
  	hostname = $2;
  	firstline = NR;

--- 183,188 -----
  	sinside = 1; soutside = 2; state = soutside;
  	hostmarker = "'"$hostmarker"'";
  }
  $1 == hostmarker {
  	if (state != soutside)
  		printf ("%s\t%s\t%d\t%d\n", hostname, FILENAME, firstline, NR - 1);
***************
*** 185,190
  	next;
  }
  $1 == hostmarker {
  	hostname = $2;
  	firstline = NR;
  	state = sinside;

--- 184,193 -----
  	hostmarker = "'"$hostmarker"'";
  }
  $1 == hostmarker {
+ 	if (state != soutside)
+ 		printf ("%s\t%s\t%d\t%d\n", hostname, FILENAME, firstline, NR - 1);
+ 	else
+ 		state = sinside;
  	hostname = $2;
  	firstline = NR;
  }
***************
*** 187,193
  $1 == hostmarker {
  	hostname = $2;
  	firstline = NR;
- 	state = sinside;
  }
  END {
  	if (state != sinside)

--- 190,195 -----
  		state = sinside;
  	hostname = $2;
  	firstline = NR;
  }
  END {
  	if (state != sinside)
***************
*** 192,198
  END {
  	if (state != sinside)
  		exit (0);
! 	printf ("%s\t%s\t%d\t%d\n", hostname, FILENAME, firstline, NR);
  	exit (0);
  }
  ' $f >> Index.t.$$

--- 194,200 -----
  END {
  	if (state != sinside)
  		exit (0);
! 	printf ("%s\t%s\t%d\t%d\n", hostname, FILENAME, firstline, NR - 1);
  	exit (0);
  }
  ' $f >> Index.t.$$
***************
*** 248,263
  		exit 1
  	;;
  
! 	-*)
! 		# unknown option
! 	;;
! 
! 	"")
! 		# no arguments
! 	;;
! 
! 	*)
! 		# by host name
  		if [ -f /usr/bin/look ]; then
  			look=/usr/bin/look
  			lookopt="-f "

--- 250,258 -----
  		exit 1
  	;;
  
! 	-h)
! 		# by host name for real this time.
! 		shift
  		if [ -f /usr/bin/look ]; then
  			look=/usr/bin/look
  			lookopt="-f "
***************
*** 295,300
  	printf ("sed -n -e \"%d,%dp\" %s;\n", $3, $4, $2);
  }'`
  		done
  		exit 0
  	;;
  esac

--- 290,313 -----
  	printf ("sed -n -e \"%d,%dp\" %s;\n", $3, $4, $2);
  }'`
  		done
+ 		exit 0
+ 	;;
+ 
+ 	-*)
+ 		# unknown option
+ 	;;
+ 
+ 	"")
+ 		# no arguments
+ 	;;
+ 
+ 	*)
+ 		# by host name
+ 		if [ -f /usr/ucb/more ]; then
+ 			uuhosts -h "$*" | /usr/ucb/more
+ 		else
+ 			exec uuhosts -h "$*"
+ 		fi
  		exit 0
  	;;
  esac


				H. Morrow Long
				ITT-ATC Systems Center, Shelton, CT
	
path = {allegra bunker dcdvaxb dcdwest ucbvax!decvax duke eosp1 ittral
	lbl-csam mit-eddie psuvax1 purdue qubix qumix research sii
	tmmnet twg uf-cgrl wxlvax yale}!ittvax!long



More information about the Comp.sources.bugs mailing list