Files
server/tools/compare_en_words.sh
T
AmirGhost11 ff300a5e84
Build / test-and-build (scribblers-linux-x64, ubuntu-latest) (push) Has been cancelled
Build / test-and-build (scribblers-macos-x64, macos-latest) (push) Has been cancelled
Build / test-and-build (scribblers-x64.exe, windows-latest) (push) Has been cancelled
feat: Initialized Project
2026-05-09 09:36:38 +03:30

24 lines
560 B
Bash
Executable File

#!/usr/bin/env bash
US_DICT="../game/words/en_us"
# For example on install british dict
# apt-get install wbritish-large
SYSTEM_GB_DICT='/usr/share/dict/british-english-large'
OUTPUT_GB_DICT="../game/words/en_gb"
FIXLIST="./fixlist"
rm -f ${FIXLIST} ${OUTPUT_GB_DICT}
while IFS= read -r line
do
grep -x ${line} ${SYSTEM_GB_DICT} # Check it exists in GB list
if [[ $? == 0 ]];
then
echo ${line} >> ${OUTPUT_GB_DICT} # Write to en_gb
else
echo ${line} >> ${FIXLIST} # Finally write to fixlist if no matches
fi
done < "${US_DICT}"