ref: bd23963c8f359d0a3c802f7cd96b51b4d36b01ac
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
'