Files
notes_estom/Linux/shell/test06.sh
法然 dd11a44b1f shell
2022-10-03 00:08:52 +08:00

15 lines
228 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
read -p "请输入一个字符并按Enter确认" KEY
case "$KEY" in
[a-z]|[A-Z])
echo "您输入的是字母"
;;
[0-9])
echo "您输入的是数字"
;;
*)
echo "您输入的是其他字符"
;;
esac