Re: cdbmake isn't making anything for me

[email protected] Wed, 22 Aug 2007 12:58:00 -0400
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
Oh, Lord.  Is there a utility that'll convert:

grumpy
happy
dopey
bashful

to: 

+6,9:grumpy->somewhere
+5,9:happy->somewhere
+5,4:dopey->here
+7,5:bashful->there

with ease?  Do I care what the somewhere, here and there keys actually are?  

------

At 12:49 PM 8/22/2007, Toby Betts wrote:
>[email protected] wrote:
>> 
>> I have a seven-line text file named mailboxes that contains this data:
>> 
>> grumpy
>> happy
>> sneezy
>> bashful
>> sleepy
>> dopey
>> doc
>> 
>> I want to translate that list into a constant database file.  
>> 
>> http://cr.yp.to/cdb/cdbmake.html tells me to execute a:
>> 
>>      cdbmake f ftmp
>> 
>> command to generate the cdb file.  When I execute a:
>> 
>>      cdbmake mailboxes mtemp
>> 
>> command, the cursor moves to a new line and nothing happens.  
>> 
>> Thinking I might have a permissions problem, I executed this command as root using explicit paths:
>> 
>>      /usr/local/bin/cdbmake /home/peter/mailboxes /home/peter/mtemp
>> 
>> and the no-result result was the same.  
>> 
>> What am I doing wrong?  
>
>A couple of things. For starters, cdbmake requires a specific record
>format that your 7-line example lacks. Instead, try this:
>
>$ cat mailboxes
>+6,9:grumpy->somewhere
>+5,9:happy->somewhere
>+5,4:dopey->here
>+7,5:bashful->there
>
>$
>
>Don't forget the extra newline at the end.
>
>Secondly, cdbmake reads from stdin, so you don't give it the name of
>your mailboxes file, only the name of the final .cdb file you expect
>to get and a temporary filename to use as cdbmake builds the database:
>
>$ cdbmake ./final.cdb ./temporary.cdb.tmp < ./mailboxes
>
>You've already read the documentation, but it can't hurt to link to it
>again for more examples:
>
><URL:http://cr.yp.to/cdb/cdbmake.html>
>
>
>Toby