ceph/branches/ebofs/script/grepblock
sageweil dc48f25847 branch for ebofs changes
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2100 29311d96-e01e-0410-9327-a35deaab8ce9
2007-11-21 00:32:00 +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;
}