Created
June 9, 2018 17:25
-
-
Save crunchywelch/9bebd95f0f51af14c4daa139d3e357ca to your computer and use it in GitHub Desktop.
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 | |
pattern="^[A-Z]" | |
function is_upper_AZ () { | |
if echo $1 | grep "$pattern" &> /dev/null | |
then | |
return 0 | |
else | |
return 1 | |
fi | |
} | |
if is_upper_AZ "$1" | |
then | |
echo "match" | |
else | |
echo "no match" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment