#!/bin/sh
# density code 0x05 for 45/60 MB (not Writable) 8000 BPI
#              0x10 for 150 MB                  10000 BPI
SESS=1
DEV=/dev/nst0
echo "Rewinding Tape"
mt -f $DEV rewind
while [ 1 ]; do
S=`echo $SESS | awk '{ printf "%04d\n",$1 }'`
echo "$SESS  $S"
dd if=$DEV of=S$S bs=512 || exit 1
SESS=`expr $SESS + 1`
done
