File:  [Research Unix] / researchv8dc / cmd / wwb / spellwwb.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv8, HEAD
researchv8 Dan Cross

# NOTICE-NOT TO BE DISCLOSED OUTSIDE BELL SYS EXCEPT UNDER WRITTEN AGRMT
trap 'rm -f /tmp/$$; trap 0;exit' 0 1 2 3 15
file=
fflag=
bflag=
vflag=
xflag=
for i in $*
	do case $i in
		-x) xflag=-x;shift; continue;;
		-v) vflag=-v;shift;continue;;
		-b) bflag=-b;shift;continue;;
		-f) fflag=F;shift;file=$1;shift;continue;;
		-ver) echo $0 version 2.0;exit;;
		-flags) echo $0 \[-f wfile\] \[-b\] \[-v\] \[-ver\] \[-flags\] \[file ...\];exit;;
		-*) echo unknown spellwwb flag $i;exit;;
		*) if test ! -r $i
		   then echo Can\'t find the file $i\; try specifying a more complete pathname.; exit
		   fi
	esac
done
if test $fflag
then 	if test ! -r $file
	then echo Can\'t find your file $file\; try specifying a more complete pathname.
		exit 1
	else spell $bflag $xflag $vflag $*|sort|comm -23 - $file >/tmp/$$
	fi
else 	if test -r $HOME/lib/spelldict 
	then spell  $bflag $xflag $vflag $* |sort|comm -23 - $HOME/lib/spelldict>/tmp/$$
	else spell  $bflag $xflag $vflag $*>/tmp/$$
	fi
fi
if test -s /tmp/$$ 
then echo -e Possible spelling errors in  $* are:"\n"
	pr -3 -t -i" "25 /tmp/$$
	echo -e '\nIf any of these words are spelled correctly, later type
                  spelladd word1 word2 ... wordn
to have them added to your spelldict file.'
fi

unix.superglobalmegacorp.com

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