Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 344 Bytes
#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
S_CODE=`printf '%d' \'$SFND`
A_CODE=`printf '%d' \'a`
SNUM=$( expr $S_CODE - $A_CODE + 1 )
echo "$SFND is $SNUM"
You can’t perform that action at this time.