Path: utzoo!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!hollie.rdg.dec.com!jch From: jch@hollie.rdg.dec.com (John Haxby) Newsgroups: comp.unix.ultrix Subject: Re: Sendmail and YP aliases Message-ID: <1991Mar18.151219.5725@hollie.rdg.dec.com> Date: 18 Mar 91 15:12:19 GMT References: <27DFCCCD.23236@orion.oac.uci.edu> Sender: news@hollie.rdg.dec.com (Mr News) Reply-To: jch@hollie.rdg.dec.com (John Haxby) Organization: Digital Equipment Corporation Lines: 22 I thought about it, but this is pretty short: --------------- #include main () { DBM *db = dbm_open ("/usr/lib/aliases", 0, 0); datum key, val; for (key = dbm_firstkey(db); key.dptr; key = dbm_nextkey(db)) { val = dbm_fetch (db, key); printf ("%.*s\t%.*s\n", key.dsize, key.dptr, val.dsize, val.dptr); } } --------------- you'll have to compile it I'm afraid :-) -- John Haxby, Definitively Wrong. Digital Reading, England <...!ukc!wessex!jch>