you could use case.
you can use single characters or wildcards.
the *) at the end is like the default
So if there are no matches it falls through to the end.
e.g:
Code:
echo input y or number or grockle_bum grockle_leg
while read x; do
case $x in
[yYNn]) echo ok
;;
[0-9]|[0-9][0-9]) echo number
;;
groc*)
echo ooh a grockle!
;;
*)
echo doh
break 2
;;
esac
echo input y or n or grockle_bum grockle_leg
done
~
man bash
also look at the
select statement maybe
try
Code:
select file in *;do cksum $file;done