#!/bin/rc rfork e mypid=$pid venticall = $1 if(~ $venticall '') venticall = 'http://127.1:8000/index' hget $venticall | awk ' /^index=/ { blockSize=0+substr($3, 11); } /^arena=/ { arena=substr($1, 7); } /^ arena=/ { printf("x %s %s %s\n", arena, substr($5 ,2), $3); } ' | sed 's/\,.*\)//g' >/tmp/offsetparse numarenas=`{wc /tmp/offsetparse} count=0 while(! ~ $count $numarenas(1)){ data = `{grep arenas^$count /tmp/offsetparse} offset=`{echo $data(3) ' - 8192' |pc |sed 's/;//g'} echo x $data(2) $offset $data(4) >>/tmp/offsets.$mypid count=`{echo $count ' + 1' |hoc} } cat /tmp/offsets.$mypid