#!/bin/sh # # spell 1.1 - show unknown words Author: Kees J. Bot # 28 Apr 1995 setglobal dict = 'words' while getopts 'd:' opt { match $opt { with d setglobal dict = $OPTARG with ? echo "Usage: spell [-d dict] [file ...]" > !2; exit 1 } } shift $[expr $OPTIND - 1] match $dict { with */* with * setglobal dict = ""/usr/lib/dict/$dict"" } do { if test $Argc = 0 { prep } else {for file in @Argv { prep $file } } } | do { sort -u | comm -23 - $dict }