发现比如
for /f "delims=囧" %%i in ("囧囧") do echo %%i&pause>nul
输出是 囧囧
@echo off
for /f "tokens=1-6" %%i in (千字文.txt) do call set words=%%words%%%%i%%j%%k%%l%%m%%n
::上面和昨天的代码重复的
set bool=no
:loop
set word=%words:~0,1%
set words=囧%words:~1%囧
for /f "delims=%word% tokens=1,2" %%a in ("%words%") do if "%%b" neq "" echo 发现重复的汉字:%word%。&set bool=yes
for /f "delims=囧" %%p in ("%words%") do set words=%%p
if "%words%" neq "囧囧" goto loop
if "%bool%"=="no" echo 没有重复的汉子。
echo 干完活啦!&pause>nul