@echo OFF
if [%1]==[] goto Usage
@echo ON

perl find_identical_words_step_1.pl > a.tmp

sort < a.tmp > b.tmp
uniq < b.tmp > a.tmp

grep "^%1" a.tmp > with_prefix.tmp
grep -v "^%1" a.tmp > without_prefix.tmp


perl check_words_with_prefixes.pl %1 filter > a.tmp

grep " 0$" a.tmp > no_words.txt
grep -v " 0$" a.tmp > errors.txt

rm -f *.tmp

@echo OFF
goto End

:Usage
echo Checks word with prefixes.
echo.
echo Usage: check_words_with_prefixes.bat prefix
echo.
echo Where prefix is some prefix in cyrillic of course.
echo For example ne, pre, etc.
echo.

:End
