|
在VMware6+RHEL5.1上运行以下代码:
#!/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 "unctuation, whitespace, or other";;
esac
当输入a、A、结果都正常,但输入b, c, d, e就输出"Uppercase letter",这是为什么? |
|