source: trunk/minix/commands/scripts/spell.sh@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 436 bytes
RevLine 
[9]1#!/bin/sh
2#
3# spell 1.1 - show unknown words Author: Kees J. Bot
4# 28 Apr 1995
5
6dict=words
7
8while getopts 'd:' opt
9do
10 case $opt in
11 d) dict="$OPTARG"
12 ;;
13 ?) echo "Usage: spell [-d dict] [file ...]" >&2; exit 1
14 esac
15done
16shift `expr $OPTIND - 1`
17
18case "$dict" in
19*/*) ;;
20*) dict="/usr/lib/dict/$dict"
21esac
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.