|
|
1.1 root 1: # NOTICE-NOT TO BE DISCLOSED OUTSIDE BELL SYS EXCEPT UNDER WRITTEN AGRMT
2: trap 'rm -f /tmp/$$; trap 0;exit' 0 1 2 3 15
3: file=
4: fflag=
5: bflag=
6: vflag=
7: xflag=
8: for i in $*
9: do case $i in
10: -x) xflag=-x;shift; continue;;
11: -v) vflag=-v;shift;continue;;
12: -b) bflag=-b;shift;continue;;
13: -f) fflag=F;shift;file=$1;shift;continue;;
14: -ver) echo $0 version 2.0;exit;;
15: -flags) echo $0 \[-f wfile\] \[-b\] \[-v\] \[-ver\] \[-flags\] \[file ...\];exit;;
16: -*) echo unknown spellwwb flag $i;exit;;
17: *) if test ! -r $i
18: then echo Can\'t find the file $i\; try specifying a more complete pathname.; exit
19: fi
20: esac
21: done
22: if test $fflag
23: then if test ! -r $file
24: then echo Can\'t find your file $file\; try specifying a more complete pathname.
25: exit 1
26: else spell $bflag $xflag $vflag $*|sort|comm -23 - $file >/tmp/$$
27: fi
28: else if test -r $HOME/lib/spelldict
29: then spell $bflag $xflag $vflag $* |sort|comm -23 - $HOME/lib/spelldict>/tmp/$$
30: else spell $bflag $xflag $vflag $*>/tmp/$$
31: fi
32: fi
33: if test -s /tmp/$$
34: then echo -e Possible spelling errors in $* are:"\n"
35: pr -3 -t -i" "25 /tmp/$$
36: echo -e '\nIf any of these words are spelled correctly, later type
37: spelladd word1 word2 ... wordn
38: to have them added to your spelldict file.'
39: fi
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.