Skip to content

Instantly share code, notes, and snippets.

@crunchywelch
Created June 9, 2018 17:25
Show Gist options
  • Save crunchywelch/9bebd95f0f51af14c4daa139d3e357ca to your computer and use it in GitHub Desktop.
Save crunchywelch/9bebd95f0f51af14c4daa139d3e357ca to your computer and use it in GitHub Desktop.
#!/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