#!/bin/bash echo "Hit a key, then hit return."read Keypress case "$Keypress" in [A-Z] ) echo "Uppercase letter";; [a-z] ) echo "Lowercase letter";; [0-9] ) echo "Digit";; * ) echo "Punctuation, whitespace, or other";;esac