wolfan 当前离线
三级士官
评分人数
Hello123World 当前离线
荣誉版主
@echo off (For /f "tokens=1* delims=:" %%i in ('findstr /n ".*" a.txt') do if "%%i"=="3" (echo welcome & echo\ &echo "加入内容") Else (echo %%j))>1.txt pause复制代码
@echo off For /f %%i in (a.txt) do Set "%%i" 2>nul echo %abcd% pause复制代码
TOP
tmplinshi 当前离线
版主
sed -i "/^:atitle$/,/^welcome$/ s/^welcome$/&\n新增行1\n新增行2/" a.txt复制代码
sed -n "/^:btitle$/,/^abcd=.*$/ s/^abcd=\(.*\)$/\1/p" a.txt复制代码
ArdentMan 当前离线
中尉
@Echo Off (For /F "delims=" %%a In (font.txt) Do ( Set "%%a"&Echo,%%a If "%%a" EQU ":atitle" Set "Flag=a" If "%%a" EQU "welcome" If Defined Flag Echo 要加入的内容&Set "Flag=" ))>tem Move tem font.txt Echo %abcd% Pause>nul复制代码