Ok, i have sorted the letters by frequency, but how can i to do that the most bigger is "e", and to put that "e" into text?
#!/usr/bin/awk -f
function swapa(arr,i,j, tmp) {
tmp=arr[i];
arr[i]=arr[j];
arr[j]=tmp;
}
function _qsort(arr,keys,i,j, k,i2,j2) {
if(j-i<1)
return...
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[s]=word[s])...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.