The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MMDB-lookup - a command line lookup tool for MMapDB databases

SYNOPSIS

 MMDB-lookup [OPTIONS] database-file key ...

OPTIONS

Options can be abbreviated.

--verbose

Normally only the data value is printed for each data record. If -v is specified the sorting field and the record id are also printed.

--help

Prints a brief help message and exits.

--man

Prints the manual page and exits.

The first non-option is interpreted as database filename. All subsequent parameters form a key to be looked up. If the lookup results in an index the whole subtree starting with the index is printed. If the key is ommitted the whole database is dumped.

DESCRIPTION

MMDB-lookup dumps MMapDB databases either completely or partly.

Example 1:

 $ MMDB-lookup transconfig.mmdb actn opi /hangman
 [[actn, opi, /hangman]] ==> [[File: '/Documents/hangman.svg', Done]]

Here the database transconfig.mmdb has been looked up for the key actn opi /hangman. Two data records have been found. Their values are File: '/Documents/hangman.svg' and Done.

Example 2:

 $ MMDB-lookup x.mmdb Tschechien 6 1-2 F
 [[Tschechien, 6, 1-2, F, di]] ==> [[6, 10, 27, 35, 48, 88, 90, 94]]
 [[Tschechien, 6, 1-2, F, do]] ==> [[1, 6, 27, 88, 94]]
 [[Tschechien, 6, 1-2, F, fr]] ==> [[1, 6, 10, 27, 48, 88, 90, 94]]
 [[Tschechien, 6, 1-2, F, mi]] ==> [[1, 10, 27, 35, 88]]
 [[Tschechien, 6, 1-2, F, mo]] ==> [[88, 90, 94]]
 [[Tschechien, 6, 1-2, F, sa]] ==> [[10, 88]]
 [[Tschechien, 6, 1-2, F, so]] ==> [[1, 6, 10, 27, 32, 48, 90, 94]]

In this example the passed key resolves to an index. Hence, the whole subtree is dumped.

Example 3:

 $ MMDB-lookup -v x.mmdb Tschechien 6 1-2 F sa
 [[Tschechien, 6, 1-2, F, sa]] ==> [[[SORTA 7076 10], [SORTB 58834 88]]]

This example is to demonstrate the --verbose option. Additionally to the data values 10 and 88 that can be found also in example 2 their sorting field and record IDs are shown.

SEE ALSO

MMapDB