*** empty log message ***
This commit is contained in:
parent
9386a9a7ac
commit
577a430ee5
8
ase/test/awk/histsort.awk
Normal file
8
ase/test/awk/histsort.awk
Normal 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
16
ase/test/awk/wordfreq.awk
Normal 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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user