Question:
My input looks like this:
VOWEL,OPENING,PLACE,ENVIRONMENT.
U,3,2,C.
I,3,2,S.
...
I want to count the different vowels but 'VOWEL' itself may not be in the output.
I had this script:
BEGIN {
FS=","
}
{
vowels [$1]++
}
END {
delete vowels[vowel]
for (vowel in vowels)
printf("%s\t%d\n", vowel, vowels[vowel])
}
Why is 'VOWEL' still in my output?
How can I solve this problem?
My input looks like this:
VOWEL,OPENING,PLACE,ENVIRONMENT.
U,3,2,C.
I,3,2,S.
...
I want to count the different vowels but 'VOWEL' itself may not be in the output.
I had this script:
BEGIN {
FS=","
}
{
vowels [$1]++
}
END {
delete vowels[vowel]
for (vowel in vowels)
printf("%s\t%d\n", vowel, vowels[vowel])
}
Why is 'VOWEL' still in my output?
How can I solve this problem?