Re: PIBKAC Error

Chris Berry <[email protected]> Thu, 15 Apr 2004 20:25:40 -0700
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Taj Khattra wrote:

| On Thu, Apr 15, 2004 at 06:53:18PM -0700, Chris Berry wrote:
|
|>I'm having a bit of trouble creating a cdb file for use with mailfront,
|>basically it's just a list of email addresses.  Here's the syntax I'm
using:
|>
|>cdbmake-sv morevalidusers.cdb morevalidusers.tmp <
|>/usr/local/src/kludge-scripts/mailfront-inputfile
|>
|>Contents of mailfront-inputfile:
|>
|>[root@mercury /usr/local/src/kludge-scripts]$ cat -A mailfront-inputfile
|>[email protected]$
|>[email protected]$
|>[email protected]$
|>[email protected]$
|
|
| cdbmake-sv expects lines of the form "foo x/y"
|
| i think what you want is
|
| 	awk '{printf"+%d,0:%s->\n", length($1), $1} END {print""}'
<mailfront-inputfile | cdbmake morevalidusers.cdb  morevalidusers.tmp
|
| or some such

Ok, that worked, but I don't have a clue what just happened.  Here's the
output without the cdbmake:

+28,0:[email protected]>
+22,0:[email protected]>
+31,0:[email protected]>
+23,0:[email protected]>

Obviously the first number is an entry length, but what's the zero and
the -> for, and how was I supposed to know all that?  There's no man
page, and I didn't see anything like that on DJB's site or when I
searched on google.

- --
Chris Berry
[email protected]
Systems Administrator
JM Associates & Coast Business Service

"Perl - The Swiss Army Chainsaw of programming."  --Henry Spencer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAf1IzkAS13ByzgbsRAil5AJ9bpfPrWe4f1t/IGbHb/6lqt12IqACgypra
62Ju5W3NsBzmf6ABxAttDJc=
=1foM
-----END PGP SIGNATURE-----