top10.sh (428B)
1 #!/bin/sh 2 # print table to stdout containing top 10 memes with averaged usage per week 3 4 printf '\n ' 5 printf '+------ top 10 (uses per week) ------+\n' 6 i=1 7 head "all_time_weekly_popularity.tsv" | while read u t; do 8 printf ' ' 9 printf '| %2d. %-23s %6.3f |\n' \ 10 "$i" \ 11 "$t" \ 12 "$u" 13 i=$((i+1)) 14 done 15 16 printf ' ' 17 printf '+------------------------------------+\n'