Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #!bin/sh
- my $file1={};
- my $file2={};
- my @line1;
- my $I1=0;
- my $I2=0;
- system("cls");
- my $nfile = shift @ARGV;
- open file1, $nfile or die "Couldn't open file $input_results: $!\n";
- $nfile = shift @ARGV;
- my $line1=<file1>;
- while (<file1>) {
- @line1=split(' ',$_);
- print $_, "\n";
- # print @line1[4]," ",@line1[8],"\n";
- open file2, $nfile or die $!;
- while (<file2>)
- {
- @line2=split(' ',$_);
- $I2=0;
- for ($I1=3, $I1=6,$I1++)
- {
- if (@line2[$I1]==@line1[4]) { $I2=$I2+1;}
- if (@line2[$I1]==@line1[8]) { $I2=$I2+1;}
- }
- if ( $I2==2) { print $I2, " ",$_, "\n";} else {print $I2," ",@line1[4]," ",@line2[3],"\n";}
- }
- print "-----------------------------------------","\n",
- close(file2);
- }
- print "\nDone!\n";
- close file1;
Add Comment
Please, Sign In to add comment