]> git.rmz.io Git - dotfiles.git/blobdiff - bin/work/pipeparser
merge bin from shada
[dotfiles.git] / bin / work / pipeparser
diff --git a/bin/work/pipeparser b/bin/work/pipeparser
new file mode 100755 (executable)
index 0000000..fc0e744
--- /dev/null
@@ -0,0 +1,24 @@
+#! /usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Cwd;
+
+my $dir = '.';
+if (@ARGV == 1) {
+    $dir = $ARGV[0];
+}
+
+while (<$dir/ReportID*>) {
+    open(FILE, $_) or die $!;
+    my $name = $_;
+    while (<FILE>) {
+        if ( /InsideDiameter=(\d+)/ ) {
+            if ($1 > 1000 && $1 < 1100) {
+                print "$name\n";
+            }
+            last;
+        }
+    }
+}