#!/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
shell 判断键盘输入
最新推荐文章于 2024-03-30 22:58:13 发布