对拍文件

bash对拍

#!/bin/bash 
fpc random
fpc a
fpc b

i=1
tot=10000000

while [ $i -le $tot ] 
do
    ./random > data.in
    ./a < data.in > a.out
    ./b < data.in > b.out
    if diff -b a.out b.out; then
        echo -e "YES!!!"
    else
        echo -e "NO!!!"
        break
    fi
    let i=i+1
done

第一次拍前要chmod -x pai.sh

你可能感兴趣的:(对拍文件)