tcdb.1 - cdb - Constant database manipulation utility
 (HTM) git clone git://git.z3bra.org/cdb.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tcdb.1 (1072B)
       ---
            1 .Dd 2022-08-31
            2 .Dt CDB 1
            3 .Os POSIX.1-2017
            4 .Sh NAME
            5 .Nm cdb
            6 .Nd Constant database utility
            7 .Sh SYNOPSIS
            8 .Nm cdb
            9 .Op Fl hdm
           10 .Op Fl k Ar key Op Fl cs Ar n
           11 .Ar file
           12 .Sh DESCRIPTION
           13 .Nm
           14 Utility to make, dump and query constant databases.
           15 .Bl -tag -width Ds
           16 .It Fl h
           17 Print a short help text
           18 .It Fl d
           19 Dump records from database
           20 .Pa file
           21 to
           22 .Pa stdout .
           23 See
           24 .Sx RECORD FORMAT
           25 .It Fl m
           26 Make database
           27 .Pa file
           28 from encoded records read from
           29 .Pa stdin .
           30 .It Fl k Ar key
           31 Query database
           32 .Pa file
           33 for record
           34 .Ar key .
           35 Only the first match is returned. To search subsequent match, see
           36 .Fl s .
           37 .It Fl c Ar n
           38 Print
           39 .Ar n
           40 records from the database (default: 1).
           41 .It Fl s Ar n
           42 Skip the first
           43 .Ar n
           44 records from the database, and display the next one (default: 0).
           45 .El
           46 .Ss RECORD FORMAT
           47 A dump record is encoded as
           48 .Li +klen,dlen:key->data
           49 followed by a newline. Here
           50 .Em klen
           51 is the number of bytes in key and
           52 .Em dlen
           53 is the number of bytes in data. The end of data is indicated by an
           54 extra newline.
           55 .Sh SEE ALSO
           56 .Xr http://cr.yp.to/cdb.html
           57 .Sh AUTHOR
           58 .An Willy Goiffon Aq Mt dev@z3bra.org