#! /bin/sh
#
#   sel-fine.sh - 念入り消去法の選択
#
#	0.0: Jun. 26, 2004 by Dai ISHIJIMA
#

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 0, 1, random'
echo '3: [3 times] write random, random, 0'
echo '4: [3 times] write random, 1, 0'
echo '5: [4 times] write 0, 1, 0, 1'
echo '6: [4 times] write 1, 0, 1, 0'
echo '7: [4 times] write random, random, 1, 0'
echo '8: [5 times] write 0, 1, 0, 1, random'
echo '9: [5 times] write 0, 1, 0, 1, 0'
echo 'a: [5 times] write 1, 0, 1, 0, 1'
echo 'b: [6 times] write 0, 1, 0, 1, 0, 1'
echo 'c: [6 times] write 1, 0, 1, 0, 1, 0'
echo 'd: [7 times] write 0, 1, 0, 1, 0, 1, random'
echo 'e: [9 times] write (0, 1, random) x 3'
echo 'f: [12 times] write (0, 1, random) x 4'
echo ''
echo -n 'Which method? [0-9a-f]: '
read ans

case x"$ans" in
	x0) stuffs='10' ;;
	x1) stuffs='01' ;;
	x2) stuffs='01R' ;;
	x3) stuffs='RR0' ;;
	x4) stuffs='R10' ;;
	x5) stuffs='0101' ;;
	x6) stuffs='1010' ;;
	x7) stuffs='RR10' ;;
	x8) stuffs='0101R' ;;
	x9) stuffs='01010' ;;
	xa) stuffs='10101' ;;
	xb) stuffs='010101' ;;
	xc) stuffs='101010' ;;
	xd) stuffs='010101R' ;;
	xe) stuffs='01R01R01R' ;;
	xf) stuffs='01R01R01R01R' ;;
esac

# EOF
