day 6 fix bug
[aoc_eblake.git] / 2015 / advent4.sh
blob9488d4373b08761793dc20f8a9ac834113e0899b
1 i=$(($2+0))
2 while :; do
3 case $(printf $1$i | md5sum) in
4 000000*) echo $i; break ;;
5 00000*) echo $i; [[ $part1 ]] && break ;;
6 esac
7 case $i in
8 *000) echo " $i" ;;
9 esac
10 i=$((i+1))
11 done