!/bin/bash read -p "Enter a sentence " s a=$( echo $s | tr -cd 'AaEeIiOouU' | wc -c) echo " Number of vowels $a" b=$( echo $s | tr -cd 'BbCcDdFfGgHhJjKkLlMmNnPpQqRrSsTtVvWwXxYyZz' | wc -c) echo " Number of consonents is $b "
No comments