#!/bin/bash

pool_file=/x/dipa/fire/runs_submitted/ben/output/Pool_after_uniq_all_file.txt
qrel_file=/y/dipa/corpus/fire_bengali/qrels/released/qrel_50.txt


only_pool_file=$(awk '{print $1 "%" $3}' $pool_file |sort|uniq|wc -l);
only_qrel_file=$(awk '{print $1 "%" $3}'  $qrel_file|sort|uniq|wc -l);
poolAndqrel_file=$(awk '{print $1 "%" $3}' $pool_file $qrel_file|sort|uniq|wc -l);
poolIntersectionqrel_file=`expr $only_pool_file + $only_qrel_file - $poolAndqrel_file`
files_to_judge=`expr $only_pool_file - $poolIntersectionqrel_file`

echo -e "only_pool_file " $only_pool_file
echo -e "only_qrel_file " $only_qrel_file
echo -e "poolUnionqrel_file " $poolAndqrel_file
echo -e "poolIntersectionqrel_file " $poolIntersectionqrel_file
echo -e "files_to_judge " $files_to_judge
				
#awk '{print $1 "%" $3}' $pool_file |sort >1.txt
#awk '{print $1 "%" $3}'  $qrel_file|sort >2.txt

#comm 1.txt 2.txt>3.txt
#awk '{print $1}' 3.txt
#grep awk '{print $1 "%" $3}' /y/dipa/corpus/fire_bengali/qrels/released/qrel_50.txt .

#awk '{print $1 "%" $3}' /x/dipa/fire/runs_submitted/ben/output/Pool_after_uniq_all_file.txt|wc
#i|sort |uniq |wc

#awk '{print $1 "%" $3}' /x/dipa/fire/runs_submitted/ben/output/Pool_after_uniq_all_file.txt - awk '{print $1 "%" $3}' /y/dipa/corpus/fire_bengali/qrels/released/qrel_50.txt

