]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 27 Dec 2005 19:00:35 +0000 (19:00 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 27 Dec 2005 19:00:35 +0000 (19:00 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@547 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/script/grepblock [new file with mode: 0755]

diff --git a/ceph/script/grepblock b/ceph/script/grepblock
new file mode 100755 (executable)
index 0000000..f5acf95
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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;
+}