Sendmail and YP aliases
John Haxby
jch at hollie.rdg.dec.com
Tue Mar 19 01:12:19 AEST 1991
I thought about it, but this is pretty short:
---------------
#include <ndbm.h>
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 <jch at wessex.rdg.dec.com>
Reading, England <...!ukc!wessex!jch>
More information about the Comp.unix.ultrix
mailing list