Created
September 8, 2017 20:52
-
-
Save f9n/391ae7fc290ab3acffee4b0c5a04f2b3 to your computer and use it in GitHub Desktop.
ShellScript, [A-Z] match lowercase letters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://unix.stackexchange.com/questions/92445/bash-script-check-if-a-variable-is-in-a-z | |
# Exampl1 | |
echo -e "Enter a character: \c" | |
read value | |
# LC_ALL=C or LANG=C | |
case $value in | |
[a-z] ) | |
echo "$value => a to z" ;; | |
[A-Z] ) | |
echo "$value => A to Z" ;; | |
* ) | |
echo "Unknown input" ;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment