Plan 9 from Bell Labs’s /usr/web/sources/contrib/akumar/dict/leginx.rc
#!/bin/rc mydictd=$home/update/dict/mkdictd cat $1 | $mydictd | awk 'BEGIN { FS = ";[ \t]*|[ \t]+" } {for (i=1; i<NF; i++) printf "%s %d\n", $i, $NF}' | sed 's/\[?([^\[\]]+)\]?/\1/g s/\([A-Za-z]+\) / /g' | sort -u -t' ' +0f -1 +0 -1 +1n -2