#!/bin/sh dd if=/dev/zero bs=1048576 count=100 !2 >/dev/null | /usr/bin/time t/helper/test-sha1 >/dev/null while read expect cnt pfx { match $expect { with '#'* continue } setglobal actual = $[ do { test -z $pfx || echo $pfx dd if=/dev/zero bs=1048576 count=$cnt !2 >/dev/null | perl -pe 'y/\000/g/' } | ./t/helper/test-sha1 $cnt] if test $expect = $actual { echo "OK: $expect $cnt $pfx" } else { echo >&2 "OOPS: $cnt> !2 "OOPS: $cnt" echo >&2 "expect: $expect> !2 "expect: $expect" echo >&2 "actual: $actual> !2 "actual: $actual" exit 1 } } </dev/null | perl -pe 'y/\000/g/' } | sha1sum | sed -e 's/ .*//] echo "$actual $cnt $pfx" } <