Move under www to ease rsync
This commit is contained in:
23
www/eps/hpr2610/hpr2610_awk12_ex10.awk
Executable file
23
www/eps/hpr2610/hpr2610_awk12_ex10.awk
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/awk -f
|
||||
|
||||
#
|
||||
# Sort the indices as strings in ascending order
|
||||
#
|
||||
BEGIN{
|
||||
PROCINFO["sorted_in"]="@ind_str_asc"
|
||||
}
|
||||
|
||||
#
|
||||
# Make a frequency table of the first letter of each word
|
||||
#
|
||||
{
|
||||
freq[substr($1,1,1)]++
|
||||
}
|
||||
|
||||
#
|
||||
# Print the results in the frequency table
|
||||
#
|
||||
END{
|
||||
for (i in freq)
|
||||
printf "%s: %d\n",i,freq[i]
|
||||
}
|
||||
Reference in New Issue
Block a user