Ez, can anyboby help me to write a code in AWk, which will count the letter frequency in text. My code:
#!/usr/bin/awk -f
{
for (i = 1; i <= NF; i++)
freq[$i]++
}
END {
for (words in freq)
split(words,word,"");
for (s in word)
#if (word=word)
print word, freq[words]}
What can be wrong?
#!/usr/bin/awk -f
{
for (i = 1; i <= NF; i++)
freq[$i]++
}
END {
for (words in freq)
split(words,word,"");
for (s in word)
#if (word
print word
What can be wrong?