ref: 069d27ba1d95fa2cf08cf483f8e03cbff1bb59ae
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
'