All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.Ostermiller.util.spell.sh Maven / Gradle / Ivy

Go to download

Open source (GPL) Java utilities maintained by Stephen Ostermiller with help from many contributors.

The newest version!
#!/bin/bash

files="$@"

for file in $files
do
	ext="${file/*./}"
	if [ "$ext" == "bte" ] || [ "$ext" == "html" ] 
	then
		mode="sgml"
	else
		mode="url"
	fi
	if [ "$ext" != "java" ] || [ ! -e "${file/java/lex}" ]
	then
		cp "$file" temp
		aspell check --mode=$mode -x -p ./util.dict temp
		if [ "`diff "temp" "$file"`" ] 
		then
			mv temp "$file"
		fi
	fi
done
head -n 1 "util.dict" > temp
tail -n +2 "util.dict" | sort | uniq >> temp
if [ "`diff "temp" "util.dict"`" ] 
then
	mv temp "util.dict"
fi
rm -f temp temp.bak




© 2015 - 2025 Weber Informatics LLC | Privacy Policy