- @echo off
- setlocal ENABLEDELAYEDEXPANSION
- (for /f "delims=" %%a in (b.txt) do (
- set /a n+=1
- set #!n!=%%a
- )
- set n=
- for /f "delims=" %%a in (a.txt) do (
- set str=%%a
- if "!str:~-4!"=="****" (
- set /a n+=1
- call echo.%%#!n!%%
- ) else (
- echo.%%a
- )
- ))>c.txt
- pause
复制代码
|