Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted by wordfreq.awk ( 11 years ago )
#!/usr/bin/awk -f
{
    $0 = tolower($0)    # remove case distinctions
    # remove punctuation
    gsub(/[^[:alnum:]_[:blank:]]/, " ", $0)
    for (i = 1; i <= NF; i++)
        freq[$i]++
}


END {
    sort = "sort -nr"
    for (word in freq)
        printf "%d\t%s\n", freq[word], word | sort
    close(sort)
}

 

Revise this Paste

Your Name: Code Language: