Monday 16 January 2012

# Program to check whether the pressed key is uppercase, lowercase, numerical digit or it is any other key


echo "Press any key"
read key
case "$key" in
[a-z]) echo "You have typed a lowercase letter" ;;
[A-Z]) echo "You have typed a uppercase letter" ;;
[0-9]) echo "You have typed a numerical digit" ;;
*) echo "You have typed a other key"
esac

No comments:

Post a Comment