summaryrefslogtreecommitdiff
path: root/db-show
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
committerJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
commitcafcd5d4368e57f162a641ed3f4835ecb5a6d391 (patch)
tree56166fbf16289d8b388cf0f1f9b51e28c3c4bdf9 /db-show
Initial revision
Diffstat (limited to 'db-show')
-rwxr-xr-xdb-show14
1 files changed, 14 insertions, 0 deletions
diff --git a/db-show b/db-show
new file mode 100755
index 0000000..5f16fc3
--- /dev/null
+++ b/db-show
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -w
+use strict;
+use DB_File;
+
+die "syntax: $0 filename.db [...]\n" unless @ARGV;
+
+file: for my $file (@ARGV) {
+ my %h;
+ dbmopen(%h, $file, 0) || do {
+ warn "$0: dbmopen($file): $!\n";
+ next file;
+ };
+ print "$_ -> $h{$_}\n" for keys %h;
+}