@echo off Setlocal Enabledelayedexpansion set n=0 for /f "tokens=1,2*" %%i in (1.txt) do ( set "ke=%%i %%j" set m=0 call :1 ) for /f "tokens=1,2*" %%i in (1.txt) do ( set "ke1=%%i %%j" set ke2=%%i set m1=0 call :2 echo !ke2! %%j %%k ) pause goto :eof :1 if not "!ke:~%m%,1!"=="" set /a m+=1&goto 1 if %m% gtr %n% set n=%m% goto :eof
:2 if not "!ke1:~%m1%,1!"=="" set /a m1+=1&goto 2 set /a dd=n-m1 for /l %%a in (1,1,%dd%) do set "ke2=!ke2! " goto :eof
batman:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion set "kong= " for /f "delims=" %%a in (1.txt) do ( for %%i in (%%a) do ( set "str=%%i"&set /a n+=1 if !n! equ 2 ( set "str=%kong%!str!" set /p=!str:~-10! <nul ) else ( set "str=!str!%kong%" set /p=!str:~,20! <nul )) set "n=0"&echo. ) pause>nul
more:
复制代码 代码如下:
@echo off setlocal enabledelayedexpansion for /f "tokens=1,2*" %%a in ('type temp.txt') do ( set "mo=%%a"&set "niu=%%b"&set "m=0"&set "n=0"&set "very=" call :ming0 %%a %%b %%c ) echo.&pause&exit :ming0 if not "!mo:~%m%,1!"=="" (set "momo=!mo:~%m%,1!"&set /a "m+=1"&goto :ming0) :ming1 if not "!niu:~%n%,1!"=="" (set "niuniu=!niu:~%n%,1!"&set /a "n+=1"&goto :ming1) set /a "ming=30-%m%-%n%" for /l %%i in (1 1 %ming%) do set "very=!very! " echo %1 %very% %2 %3
523066680:
复制代码 代码如下:
@echo off mode con cols=100 lines=20 setlocal enabledelayedexpansion for /l %%a in (1,1,80) do set kong= !kong! for /f "eol= tokens=1,2,3" %%a in ('type 1.txt') do ( set lie1-2=%%a%%b%kong% set lie1-2=!lie1-2:~0,80! set lie1-2=%%a!lie1-2:%%a%%b=!%%b echo,!lie1-2! %%c )