*** empty log message ***

This commit is contained in:
hyung-hwan 2006-09-02 15:08:50 +00:00
parent 9386a9a7ac
commit 577a430ee5
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{
if (data[$0]++ == 0) lines[++count] = $0;
}
END {
for (i = 1; i <= count; i++) print lines[i];
}

16
ase/test/awk/wordfreq.awk Normal file
View File

@ -0,0 +1,16 @@
# wordfreq.awk --- print list of word frequencies
{
$0 = tolower($0); # remove case distinctions
# remove punctuation
#gsub(/[^[:alnum:]_[:blank:]]/, "", $0);
for (i = 1; i <= NF; i++) freq[$i]++;
}
END {
for (word in freq)
print word, "\t", freq[word];
}