touch foo
rm foo
for i in win*/r.log
do
    echo $i >> foo
    grep -B4 bes $i | tail -5 >> foo
done
for  i in win*/*/r.log
do
    echo $i >> foo
    grep -B4 bes $i | tail -5 >> foo
done
awk -f get-best-list1.awk  foo 
