genfile

#!/bin/bash
if [ $# -ne 5 ]
then
echo "usage: $0 <start_count> <end_count> <device_to_read_from><output_filename>"
echo "example: $0 1 500 /dev/sda 4096 run1"
exit
fi

skip=0
for i in `seq $1 $2`
do
dd if=$3 of=${5}.$i count=1 bs=$4 skip=$skip
((skip+=1))
done

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.