Commit | Line | Data |
---|---|---|
435e8dff | 1 | #!/bin/sh - |
91de73ce | 2 | # |
ad787160 C |
3 | # Copyright (c) 1988, 1993 |
4 | # The Regents of the University of California. All rights reserved. | |
435e8dff | 5 | # |
ad787160 C |
6 | # This module is believed to contain source code proprietary to AT&T. |
7 | # Use and redistribution is subject to the Berkeley Software License | |
8 | # Agreement and your Software Agreement with AT&T (Western Electric). | |
91de73ce | 9 | # |
ad787160 | 10 | # @(#)suggest.sh 8.1 (Berkeley) 6/6/93 |
2791ff57 KB |
11 | # |
12 | ||
91de73ce | 13 | trap 'rm $$; exit' 1 2 3 15 |
435e8dff | 14 | D=/usr/share/dict/explain.d |
91de73ce KB |
15 | while echo "phrase?";read x |
16 | do | |
17 | cat >$$ <<dn | |
18 | /$x.* /s/\(.*\) \(.*\)/use "\2" for "\1"/p | |
19 | dn | |
20 | case $x in | |
21 | [a-z]*) | |
22 | sed -n -f $$ $D; rm $$;; | |
23 | *) rm $$;; | |
24 | esac | |
25 | done |