shell 判断键盘输入

    技术2022-05-20  40

    #!/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


    最新回复(0)