Plan 9 from Bell Labs’s /usr/web/sources/contrib/btdn/src/bank/bal
#!/bin/rc file=$1 start=$2 end=$3 range=`{seq $start $end} { for (i in $range) { echo -n `{ndb/query -f $file record $i diff}+ } echo '0' } | bc