eval 'exec perl -I ./bin -S $0 ${1+"$@"}' #-*-Perl-*- if 0; require 5.001; ($progname) = ($0 =~ m!([^/]+)$!); sub usage { die <$opt_o") if ($opt_o); while (<>) { /^v/ && do { print $_; next; }; @F = split; if ($F[2] == $opt_s) { # if src matches if (($opt_f != -1) && $F[7] != $opt_f) { next; } print $_ unless (($opt_d != -1) && $F[3] != $opt_d); # print unless dst & !match next; } if ($opt_b && $F[3] == $opt_s) { # else if bi && dst fld mch if (($opt_f != -1) && $F[7] != $opt_f) { next; } print $_ unless (($opt_d != -1) && $F[2] != $opt_d); # prt unless dst & !mch sfld next; } if ($opt_e) { print $_ unless !($F[0] eq 'E'); next; } } close(STDOUT); exit;