#!/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 || exit 1
mt -f $DEV setdensity 0x10 || exit 1
FILES=S????
if [ $1. != . ]; then
  FILES=$1????
fi
echo "Files: $FILES"
for i in $FILES; do
echo -n $i
echo -n " "
dd if=$i of=/dev/nst0 bs=512 || exit 1
done
#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
