Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # spell 1.1 - show unknown words Author: Kees J. Bot
|
---|
4 | # 28 Apr 1995
|
---|
5 |
|
---|
6 | dict=words
|
---|
7 |
|
---|
8 | while getopts 'd:' opt
|
---|
9 | do
|
---|
10 | case $opt in
|
---|
11 | d) dict="$OPTARG"
|
---|
12 | ;;
|
---|
13 | ?) echo "Usage: spell [-d dict] [file ...]" >&2; exit 1
|
---|
14 | esac
|
---|
15 | done
|
---|
16 | shift `expr $OPTIND - 1`
|
---|
17 |
|
---|
18 | case "$dict" in
|
---|
19 | */*) ;;
|
---|
20 | *) dict="/usr/lib/dict/$dict"
|
---|
21 | esac
|
---|
22 |
|
---|
23 | {
|
---|
24 | if [ $# = 0 ]
|
---|
25 | then
|
---|
26 | prep
|
---|
27 | else
|
---|
28 | for file
|
---|
29 | do
|
---|
30 | prep "$file"
|
---|
31 | done
|
---|
32 | fi
|
---|
33 | } | {
|
---|
34 | sort -u | comm -23 - "$dict"
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.