annotate tools/filters/commWrapper.pl @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 #! /usr/bin/perl -w
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 use strict;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 use warnings;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 use File::Temp "tempfile";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 #use POSIX qw(tmpnam);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 my ($input1, $input2, $mode, $out_file1) = @ARGV;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 my ($fh, $file1) = tempfile();
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 my ($fh1,$file2) = tempfile();
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 `sort $input1 > $file1`;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 `sort $input2 > $file2`;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 `comm $mode $file1 $file2 > $out_file1`;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 `rm $file1 ; rm $file2`;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19