ref: 5a534f942cb455f76e17e2b8190d7d06eb8c5359
dir: /sys/src/cmd/dict/egfix/
#!/bin/rc
sed '
s/[ ]+$//
/ /!d
/, /{; h; s/,.*//; p; g; s/ .*, / /; }
' $1 |
sed '
/\(/{; h; s/\([^)]+\)//; p; g; s/[()]//g; }
' |
sed '
s/ +/ /
s/[ ]+$//
s/ +/ /g
'