chiark / gitweb /
canon: support searching sells too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 24 Jan 2011 17:50:38 +0000 (17:50 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 24 Jan 2011 17:50:38 +0000 (17:50 +0000)
yarrg/canon

index 3d4bc676d7ffed0c8ff72927705277012c13426a..78c5849f9a9b0be7c69ce3c8b005bb1931b6a669 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 use strict qw(refs vars);
 our %s;
+my $bs= $ARGV[2];
 foreach my $ab (qw(0 1)) {
     open F, "zcat $ARGV[$ab] |" or die $!;
     while (<F>) {
-        my @l= split /\t/, $_;
+        chomp;
+        my @l= split /\t/, $_, -1;
+        @l == 6 or die "$#l";
+        if ($bs) { @l= ($l[0],$l[1],$l[4],$l[5]); }
         next unless length $l[2];
         $l[3]='1001' if $l[3] eq '>1000';
         my $k= sprintf "%-31s\t%-23s", $l[1], $l[0];