get number of latin letter in alphabet simple
tolikpunkoff Jun 6th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #get number of latin letter in alphabet
- #use nlett <letter>, e.g nlett a
- SFND=`echo $1|grep '^[a-z]$'`
- if [ -z "$SFND" ]; then
- echo "Error: in first parameter must be one small latin letter!"
- exit 1
- SNUM=`expr index $ALPHABET $SFND`
- echo "$SFND is $SNUM"
RAW Paste Data