Annotation of 43BSDTahoe/usr.bin/spell/spell.sh, revision 1.1

1.1     ! root        1: #! /bin/sh
        !             2: #
        !             3: #      @(#)spell.sh    1.3     (Berkeley)      83/09/10
        !             4: #
        !             5: : V data for -v, B flags, D dictionary, S stop, H history, F files, T temp
        !             6: V=/dev/null            B=                      F= 
        !             7: S=/usr/dict/hstop      H=/dev/null             T=/tmp/spell.$$
        !             8: next="F=$F@"
        !             9: trap "rm -f $T ${T}a ; exit" 0
        !            10: for A in $*
        !            11: do
        !            12:        case $A in
        !            13:        -v)     B="$B@-v"
        !            14:                V=${T}a ;;
        !            15:        -x)     B="$B@-x" ;;
        !            16:        -b)     D=${D-/usr/dict/hlistb}
        !            17:                B="$B@-b" ;;
        !            18:        -d)     next="D=" ;;
        !            19:        -s)     next="S=" ;;
        !            20:        -h)     next="H=" ;;
        !            21:        -*)     echo "Bad flag for spell: $A"
        !            22:                echo "Usage:  spell [ -v ] [ -b ] [ -d hlist ] [ -s hstop ] [ -h spellhist ]"
        !            23:                exit ;;
        !            24:        *)      eval $next"$A"
        !            25:                next="F=$F@" ;;
        !            26:        esac
        !            27: done
        !            28: IFS=@
        !            29: case $H in
        !            30: /dev/null)     deroff -w $F | sort -u | /usr/lib/spell $S $T |
        !            31:                /usr/lib/spell ${D-/usr/dict/hlista} $V $B |
        !            32:                sort -u +0f +0 - $T ;;
        !            33: *)             deroff -w $F | sort -u | /usr/lib/spell $S $T |
        !            34:                /usr/lib/spell ${D-/usr/dict/hlista} $V $B |
        !            35:                sort -u +0f +0 - $T | tee -a $H
        !            36:                who am i >> $H 2> /dev/null ;;
        !            37: esac
        !            38: case $V in
        !            39: /dev/null)     exit ;;
        !            40: esac
        !            41: 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.