#!/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