[H-GEN] Reading Berkely DB files
Mark Suter
suter at zwitterion.humbug.org.au
Wed Apr 27 19:23:05 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David,
> does anyone know of a program that can read Berkely .db files....
> I have a few of these in Amateur Radio programs that i need to be able
> to read out...
Yes, I'm sure someone knows of such a program. Have a read:
http://www.catb.org/~esr/faqs/smart-questions.html
There are almost as many ways to do this as there are variations
of the "Berkely db" formats. Here's one, using the GDBM module -
other options include NDBM_File, ODBM_File and SDBM_File.
$ perl -T -w -e 'use strict; use GDBM_File;
tie my %db, "GDBM_File", $ARGV[0], &GDBM_READER, 0600 or die "tie: $!\n";
while (my ($key,$val) = each %db) {
print "$key => $val\n";
}
untie %db' FILENAME
Yours sincerely,
- -- Mark John Suter | I know that you believe you understand
suter at humbug.org.au | what you think I said, but I am not sure
gpg key id 2C71D63D | you realise that what you heard is not
mobile 0411 262 316 | what I meant. Robert J. McCloskey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Check Keyservers or http://zwitterion.org/keys/
iD8DBQFCcB7ZRYso2ixx1j0RArlnAJ9jaqtS0lcMcvykOSgOCTZVoWm4jgCfafVB
ObgqGrluJwC9JF9MrBO2Ho4=
=xL8k
-----END PGP SIGNATURE-----
More information about the General
mailing list