aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dict/egfix
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/dict/egfix')
-rwxr-xr-xsrc/cmd/dict/egfix15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd/dict/egfix b/src/cmd/dict/egfix
new file mode 100755
index 00000000..192320c2
--- /dev/null
+++ b/src/cmd/dict/egfix
@@ -0,0 +1,15 @@
+#!/bin/rc
+
+sed '
+ s/[ ]+$//
+ / /!d
+ /, /{; h; s/,.*//; p; g; s/ .*, / /; }
+' $1 |
+sed '
+ /\(/{; h; s/\([^)]+\)//; p; g; s/[()]//g; }
+' |
+sed '
+ s/ +/ /
+ s/[ ]+$//
+ s/ +/ /g
+'