Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cbosgd!mark From: mark@cbosgd.UUCP (Mark Horton) Newsgroups: net.sources Subject: Re: uupath(1) - print full uucp path or route Message-ID: <2267@cbosgd.UUCP> Date: Fri, 4-Jul-86 19:05:50 EDT Article-I.D.: cbosgd.2267 Posted: Fri Jul 4 19:05:50 1986 Date-Received: Sat, 5-Jul-86 08:32:06 EDT References: <1032@rlgvax.UUCP> Organization: AT&T Bell Laboratories, Columbus, Oh Lines: 21 Keywords: pathalias, pathaliases, uucp, UUCP, dbm(3), shortest path 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