#!/bin/ksh
#
# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
#

if [[ $# != 3 ]]
then print "usage: ${0##*/} bindir target_file count"
     exit 1
fi

typeset -i offset
typeset -i length
typeset -i count

RANDOM=$SECONDS
offset=0
length=$RANDOM
count=$3

while (( count > 0 ))
do 
	print "Count: $count"
	$1/wf -l $length -L $offset -b 512 $2
	(( offset = RANDOM * 512 + offset + length )) 
	(( length = RANDOM ))
	(( count = count - 1 ))
done


