:
@echo off&setlocal enabledelayedexpansion
If it does not exist 1.txt, echo "1.txt does not exist, please save the content to be processed as 1.txt text" & pause & exit
For /f %%i in (1.txt) do (
set /a x+=1
call :1 "%%i" x!x!
set name=!name! x!x!
)
For %%j in (%name%) do (
For /l %%i in (1,1,%n%) do set /p=!%%j_%%i! <nul
echo.
)
echo.&echo.
set /p oo=Enter the specified number for interception of upper and lower lines:
For /l %%i in (1,1,10) do (
For %%j in (%name%) do (
if defined x_x set ok%%j_%%i=!%%j_%%i!
if !%%j_%%i! equ %oo% (call set ok!_tmp!=%%!_tmp!%%) else (
if not defined ok!_tmp! call set ok!_tmp!= )
set x_x=&set _tmp=
if !%%j_%%i! equ %oo% (set x_x=x&set ok%%j_%%i=!%%j_%%i!) else (
set _tmp=%%j_%%i
)
)
set x_x=
)
For %%j in (%name%) do (
For /l %%i in (1,1,10) do set /p=!ok%%j_%%i! <nul
echo.
)
pause
exit
:1
set xx=%~1
set n=0
:2
set /a n+=1
if "%xx%" gtr "" (set %~2_%n%=%xx:~0,1%&set xx=%xx:~1%&goto 2) else (goto :eof)
goto :eof
Who can tell me the meaning of each line below and the role of these symbols, especially in the judgment statement
@echo off&setlocal enabledelayedexpansion
If it does not exist 1.txt, echo "1.txt does not exist, please save the content to be processed as 1.txt text" & pause & exit
For /f %%i in (1.txt) do (
set /a x+=1
call :1 "%%i" x!x!
set name=!name! x!x!
)
For %%j in (%name%) do (
For /l %%i in (1,1,%n%) do set /p=!%%j_%%i! <nul
echo.
)
echo.&echo.
set /p oo=Enter the specified number for interception of upper and lower lines:
For /l %%i in (1,1,10) do (
For %%j in (%name%) do (
if defined x_x set ok%%j_%%i=!%%j_%%i!
if !%%j_%%i! equ %oo% (call set ok!_tmp!=%%!_tmp!%%) else (
if not defined ok!_tmp! call set ok!_tmp!= )
set x_x=&set _tmp=
if !%%j_%%i! equ %oo% (set x_x=x&set ok%%j_%%i=!%%j_%%i!) else (
set _tmp=%%j_%%i
)
)
set x_x=
)
For %%j in (%name%) do (
For /l %%i in (1,1,10) do set /p=!ok%%j_%%i! <nul
echo.
)
pause
exit
:1
set xx=%~1
set n=0
:2
set /a n+=1
if "%xx%" gtr "" (set %~2_%n%=%xx:~0,1%&set xx=%xx:~1%&goto 2) else (goto :eof)
goto :eof
Who can tell me the meaning of each line below and the role of these symbols, especially in the judgment statement
