BSD 4_4 release
[unix-history] / usr / src / usr.bin / diction / NOTUSED / suggest.sh
CommitLineData
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 13trap 'rm $$; exit' 1 2 3 15
435e8dff 14D=/usr/share/dict/explain.d
91de73ce
KB
15while echo "phrase?";read x
16do
17cat >$$ <<dn
18/$x.* /s/\(.*\) \(.*\)/use "\2" for "\1"/p
19dn
20case $x in
21[a-z]*)
22sed -n -f $$ $D; rm $$;;
23*) rm $$;;
24esac
25done