Blame view
tools/scripts/RemoveLineContaining.pl
402 Bytes
e6be5137b reinitialized pro... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#!/usr/bin/perl if(@ARGV != 1) { die("BAD USAGE: <(i) burning_word_list> "); } my $file; my %filter; open($file, $ARGV[0]); while(<$file>){ chomp($_); $filter{$_}++; } while(<STDIN>){ chomp($_); my @splittedLine = split(/\t/, $_); my $print = 1; for(my $i = 0; $i < @splittedLine; $i++){ if(exists $filter{$splittedLine[$i]}){ $print = 0; } } if($print == 1){ print "$_ "; } } |