From: Dobrica Pavlinusic Date: Sat, 26 Aug 2006 23:09:20 +0000 (+0000) Subject: changed options to -o offset and -l limit X-Git-Url: http://git.rot13.org/?p=Biblio-Isis;a=commitdiff_plain;h=98df52084ab3942eb11c8db3d977330263faa64a changed options to -o offset and -l limit git-svn-id: file:///home/dpavlin/svn/Biblio-Isis/trunk@68 4670fa4d-42ec-0310-ab5b-a66af6943492 --- diff --git a/scripts/dump_isisdb.pl b/scripts/dump_isisdb.pl index c2f5227..fe7c98c 100755 --- a/scripts/dump_isisdb.pl +++ b/scripts/dump_isisdb.pl @@ -17,9 +17,9 @@ BEGIN { } my %opt; -getopts('dn:', \%opt); +getopts('do:l:', \%opt); -my $isisdb = shift @ARGV || die "usage: $0 [-n number] [-d] /path/to/isis/BIBL\n"; +my $isisdb = shift @ARGV || die "usage: $0 [-o offset] [-l limit] [-d] /path/to/isis/BIBL\n"; my $isis = Biblio::Isis->new ( isisdb => $isisdb, @@ -30,9 +30,9 @@ my $isis = Biblio::Isis->new ( print "rows: ",$isis->count,"\n\n"; -my $min = 1; +my $min = $opt{o} || 1; my $max = $isis->count; -$max = $opt{n} if ($opt{n}); +$max = ( $min + $opt{l} - 1 ) if ($opt{l}); for my $mfn ($min .. $max) { print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($opt{'d'});