Annotation of 43BSDReno/usr.bin/spell/spell.sh, revision 1.1.1.1

1.1       root        1: #! /bin/sh
                      2: #
                      3: #      @(#)spell.sh    1.5     (Berkeley)      89/08/21
                      4: #
                      5: : V data for -v, B flags, D dictionary, S stop, H history, F files, T temp
                      6: : R for deroff program
                      7: V=/dev/null            B=                      F= 
                      8: S=/usr/share/dict/hstop        H=/dev/null             T=/tmp/spell.$$
                      9: R="deroff@-w"
                     10: 
                     11: next="F=$F@"
                     12: trap "rm -f $T ${T}a ; exit" 0
                     13: for A in $*
                     14: do
                     15:        case $A in
                     16:        -v)     B="$B@-v"
                     17:                V=${T}a ;;
                     18:        -x)     B="$B@-x" ;;
                     19:        -b)     D=${D-/usr/share/dict/hlistb}
                     20:                B="$B@-b" ;;
                     21:        -d)     next="D=" ;;
                     22:        -s)     next="S=" ;;
                     23:        -h)     next="H=" ;;
                     24:        -t)     R=detex ;;
                     25:        -l)     R=delatex ;;
                     26:        -*)     echo "spell: illegal option -- $A"
                     27:                echo "usage: spell [-bvtl] [-d hlist] [-s hstop] [-h spellhist]"
                     28:                exit ;;
                     29:        *)      eval $next"$A"
                     30:                next="F=$F@" ;;
                     31:        esac
                     32: done
                     33: IFS=@
                     34: case $H in
                     35: /dev/null)     $R $F | sort -u | /usr/libexec/spell $S $T |
                     36:                /usr/libexec/spell ${D-/usr/share/dict/hlista} $V $B |
                     37:                sort -u +0f +0 - $T ;;
                     38: *)             $R $F | sort -u | /usr/libexec/spell $S $T |
                     39:                /usr/libexec/spell ${D-/usr/share/dict/hlista} $V $B |
                     40:                sort -u +0f +0 - $T | tee -a $H
                     41:                who am i >> $H 2> /dev/null ;;
                     42: esac
                     43: case $V in
                     44: /dev/null)     exit ;;
                     45: esac
                     46: sed '/^\./d' $V | sort -u +1f +0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.