
- 帖子
- 13
- 积分
- 192
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2008-9-2
|
@echo off
setlocal enabledelayedexpansion
set n=0
set before=不存在
set beforebefore=不存在
for /f "delims=" %%i in (a.txt) do (
set cur=%%i
if "!before:~0,4!"=="abcd" (
echo ------------
echo 上一行:!beforebefore!
echo 当前行:!before!
echo 下一行:%%i
echo _____________
)
set beforebefore=!before!
set before=!cur!
)
这是第二道题目,第一个更简单哦 |
|