lwbu571 当前离线
列兵
@echo off for /f "delims=" %%i in ('dir /s/b *.txt') do ( findstr "#" "%%i" >> op.txt ) start op.txt exit复制代码
awk 当前离线
上尉
sed "/^#/,$!d" a.txt >a_new.txt复制代码
TOP
cjiabing (甲兵时代)当前离线
荣誉版主
more +7 a.txt>>new_a.txt复制代码
for /f "tokens=1* delims=#:" %%a in ('findstr /n /b "#" d:\a.txt') do echo;%%b&more +%%a d:\a.txt复制代码
CrLf 当前离线
论坛巡查
findstr /bc:"#" /c:" " a.txt复制代码
findstr /vb "[a-Z]" b.txt复制代码
@echo off for /f "delims=" %%a in (a.txt) do ( set str=%%a setlocal enabledelayedexpansion if "!str:~,1!"=="#" set echo=yes for /f "delims=" %%b in ("!echo!") do ( endlocal set echo=%%a ) ) pause复制代码
@echo off for /f "delims=" %%a in (a.txt) do ( for /f "delims=#" %%b in ("@%%a") do if %%b==@ set echo=yes if defined echo echo %%a ) pause复制代码
weichenxiehou 当前离线
@echo off for /f "delims=" %%i in ('dir /b /s *.txt') do ( sed -ni "/^#/,$p" "%%i" )复制代码
sed -n -i "/^#/,$p" "%%i" *.txt复制代码
powerbat 当前离线
大校
@set @n=0/* @echo off for /f "delims=" %%i in ('dir /b *.txt') do ( cscript.exe -e:jscript "%~f0" "%%i" >>op.txt ) exit /b */ fso = new ActiveXObject("Scripting.FileSystemObject"); s = fso.OpenTextFile(WScript.Arguments(0)).ReadAll(); a = s.match(/^#/m); if(a) WScript.Echo( s.slice(a.lastIndex-1) );复制代码
评分人数