本帖最后由 went 于 2022-3-26 23:03 编辑
test.bat- @echo off & cd /d "%~dp0"
- setlocal enabledelayedexpansion
- (
- for /f "usebackq delims=" %%i in ("a.txt") do (
- for /f "tokens=3* delims=-" %%a in ("%%i") do (
- set /a "a=0,b=0,c=0" & set "line=%%b"
- if "!line:~-1!"=="/" set "line=!line:~0,-1!"
- for %%b in ("!line:.=" "!") do (
- set "d=0"
- for %%c in (www com cn net) do if "%%~b"=="%%c" set "d=1"
- if "!d!"=="0" ( set /a "a+=1" & set "b=1" ) else ( set "c=1" )
- )
- )
- if "!a!!b!!c!" equ "111" echo %%i
- )
- ) >"b.txt"
- pause&exit
复制代码
|