a=""
b="efbc"
iter=0
a=$(openssl dgst -md5 doc2.txt | awk '{print $2}' | cut -c1-4)
until [ "$a" == "$b" ];do
    iter=$(($iter+1))
    sed -i 's\$\ \' doc1.txt
    a=$(openssl dgst -md5 doc2.txt | awk '{print $2}' | cut -c1-4)
done
echo $iter