uupath(1) - print full uucp path or route

Mark Horton mark at cbosgd.UUCP
Sat Jul 5 09:05:50 AEST 1986


Nice program, but let me show a 1 line shell script that does the
same thing AND doesn't depend on dbm.  (It does, however, depend
on the "look" command, which is in the same category as dbm, it's
from AT&T, in V7, but not in System III or V.  The program does a
binary search on a text file, is fairly short, and someone could
write a public domain version, possibly using public domain code
in smail as a starting point, easily.)  This also assumes your
paths file is sorted with "sort -f", which we recommend:

This program lives in /usr/local/bin/uur, and is used like this
	uur ucbvax
The argument can be any prefix to the name, thus
	uur dec
shows all hosts beginning with "dec".  Kind of like
	egrep ^dec /usr/lib/uucp/paths
but, due to the binary search, is MUCH faster.

	Mark

#! /bin/sh
exec look -f $* /usr/lib/uucp/paths



More information about the Comp.sources.unix mailing list