[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
@echo off
setlocal enabledelayedexpansion
set /a total=0
:: 4字组合的个数
set /a word4num=0
for /f "delims=" %%i in (test.txt) do (
        set line=%%i
        for %%j in (!line!) do (
                set word4=%%j
                set desmap!word4num!=!word4!
                set /a word4num+=1
                set /a total+=4
                for /l %%n in (0 1 3) do (
                        set temp=!word4:~%%n,1!
                        :: 打印重复的字
                        if defined dic[!temp!] echo !temp!重复
                        set dic[!temp!]=!temp!
                )
        )
)
:: 总的字数
echo 总字数:!total!
echo 点击继续,逆序打印
pause>nul
for /l %%m in (!word4num!, -1, 0) do (
        set descnum=%%m
        :: 逆序打印
        call echo %%desmap!descnum!%%
)

TOP

返回列表