helpful progress reporting
[IRC.git] / Robust / src / Benchmarks / WebServer / Workload / batch / difference.sh
1 #!/bin/sh
2
3 rm result_inventory
4 #For every trans_inventory* file remove the lines starting with pre and sort the file
5 for file in `ls trans_inventory*`
6 do
7         echo "Doing $file"
8         grep -v pre $file > ${file}.nopre
9         sort -n ${file}.nopre > runs/${file}.sorted
10 done
11
12 \rm *.nopre
13 cd runs
14 let x=0;
15 #for every sorted file created above diff it with the orginial file called pure/trans_inventory.sorted and print the total success or failures occured
16 for file in `ls *sorted`
17 do
18         echo -n "Diffing $file...";
19         diff $file ./pure/trans_inventory.sorted
20         if [ $? -ne 0 ]
21         then
22                 let "x+=1";
23         else
24                 echo " success ";
25         fi
26 done
27
28 echo "RESULT: x is $x";
29 echo -n "RESULT: Total files compared is "
30 ls *sorted | wc -l 
31
32 cd ..