try this :
clear
echo "Please insert your string and then press ENTER"
read a
echo $a | awk ' BEGIN { FS="@"}
{
dummy=0
vowels=0
consonants=0
lang=length($1)
while ( lang != dummy )
{
dummy=dummy+1
if ( substr($1,dummy,1) == "a" )
{
vowels=vowels+1
}
if ( substr($1,dummy,1) == "e" )
{
vowels=vowels+1
}
if ( substr($1,dummy,1) == "i" )
{
vowels=vowels+1
}
if ( substr($1,dummy,1) == "o" )
{
vowels=vowels+1
}
if ( substr($1,dummy,1) == "u" )
{
vowels=vowels+1
}
}
} END {
consonants=dummy-vowels
print "you have "vowels" vowels in your string"
print "you have "consonants" consonants in your string"
print "your string is "dummy" characters long"
}'