China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-29 07:59
中国DOS联盟论坛 » 论坛回收站 » Everyone, who can help translate the following code View 8,373 Replies 0
Original Poster Posted 2010-11-25 16:20 ·  中国 上海 闵行区 电信
新手上路
Credits 15
Posts 11
Joined 2009-02-19 16:51
17-year member
UID 139288
Gender Male
From 安微
Status Offline
:
@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
Forum Jump: