#! /bin/sh
#
#   sel-fine.sh - 念入り消去法の選択
#
#	0.0: Jun. 26, 2004 by Dai ISHIJIMA
#	0.1: Feb. 17, 2007 (for wpout08)
#

resultfil=/tmp/result

stuffs="${stuffs:-10}"

echo ''; echo ''; echo ''
echo '*** select erase method ***'
echo ''
echo '0: [twice] write 1, 0'
echo '1: [twice] write 0, 1'
echo '2: [3 times] write random, 1, 0'
echo '3: [3 times] write pattern, inverted, 0'
echo '4: [3 times] write pattern, inverted, random'
echo '5: [4 times] write pattern, inverted, 1, 0'
echo '6: [4 times] write pettern, inverted, random, 0'
echo '7: [4 times] write random, random, 1, 0'
echo '8: [5 times] write pattern, inverted, random, 1, 0'
echo '9: [6 times] write (pattern, inverted, 0) x 2'
echo 'a: [8 times] write (pattern, inverted, 1, 0) x 2'
echo 'b: [9 times] write (pattern, inverted, 0) x 3'
echo 'c: [10 times] write (pattern, inverted, random, 1, 0) x 2'
echo 'd: [12 times] write (pattern, inverted, 1, 0) x 3'
echo 'e: [12 times] write (pattern, inverted, 0) x 4'
echo 'f: [15 times] write (pattern, inverted, random, 1, 0) x 3'
echo ''
echo -n 'Which method? [0-9a-f]: '
read ans

case x"$ans" in
	x0) stuffs='10' ;;
	x1) stuffs='01' ;;
	x2) stuffs='R10' ;;
	x3) stuffs='PQ0' ;;
	x4) stuffs='PQR' ;;
	x5) stuffs='PQ10' ;;
	x6) stuffs='PQR0' ;;
	x7) stuffs='RR10' ;;
	x8) stuffs='PQR10' ;;
	x9) stuffs='PQ0PQ0' ;;
	xa) stuffs='PQ10PQ10' ;;
	xb) stuffs='PQ0PQ0PQ0' ;;
	xc) stuffs='PQR10PQR10' ;;
	xd) stuffs='PQ10PQ10PQ10' ;;
	xe) stuffs='PQ0PQ0PQ0PQ0' ;;
	xf) stuffs='PQR10PQR10PQR10' ;;
esac

# EOF
