#!/bin/sh
#	q variable value descr
# Ask the user for the value of a variable. 
# If value is given, it is the default.

while true
do	echo -n 'Enter '$2': ['$1'] '
	read var
	case "$var" in
	  q|quit|exit)	exit 0;;
	     '?'|help)	cat $HELPDIR/$var; continue;;
	           "") continue;;
	  *)	echo -n 'Is "'$var'" correct? '
		read tmp
		case "$tmp" in
		  q|quit|exit) exit;;
	         '?'|help) cat $HELPDIR/$var; continue;;
		        ""|y*) break;;
		            *) continue;;
		esac;
		break;;
	esac
done
