idc878787 当前离线
一级士官
went 当前离线
少校
@echo off & cd /d "%~dp0" setlocal enabledelayedexpansion REM 输入输出文件 set "in_txt=1.txt" set "out_txt=2.txt" REM 提取的域名 set "host_list=cnphotoshop shabasoku shoku" ( for /f "tokens=1* delims=," %%i in ('findstr "%host_list%" "%in_txt%"') do ( set "a=%%i" set "b=%%j" echo !a:~0,16! = !b:~0,16! ) )>"%out_txt%" pause&exit复制代码
TOP
set "host_list=.*"复制代码
@echo off & cd /d "%~dp0" setlocal enabledelayedexpansion REM 输入输出文件 set "in_txt=1.txt" set "out_txt=2.txt" ( for /f "usebackq tokens=1* delims=," %%i in ("%in_txt%") do ( set "a=%%i" set "b=%%j" if "!a:~0,16!"=="!b:~0,16!" echo %%i,%%j ) )>"%out_txt%" pause&exit复制代码