ceph/branches/sage/pgs/script/grepblock
sageweil 9213a23f14 eek
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1138 29311d96-e01e-0410-9327-a35deaab8ce9
2007-02-28 18:42:55 +00:00

16 lines
234 B
Perl
Executable File

#!/usr/bin/perl
use strict;
my $block = shift ARGV;
die unless int $block;
while (<>) {
my $yes = 0;
for my $x (/(\d+\~\d+)/) {
my ($s,$l) = split(/\~/,$x);
$yes = 1 if ($block >= $s && $block < $s+$l);
}
print if $yes;
}