- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in (a.txt) do set /a m+=1&set a!m!=%%i
- :sta
- for /f "delims=" %%i in (b.txt) do (
- set /a n+=1
- set b!n!=%%i
- set b!u!=%%i
- )
- cls
- set /a num+=1
- for /L %%i in (1 1 !m!) do (
- set /a ran=!random!
- set str=!a%%i!
- set str1=!a%%i!
- for /f %%a in ("!b%%i!") do set str=!str:_=%%a!
- if !num! equ 2 echo !str!
- for /f %%b in ("!ran!") do set str1=!str1:_=%%b!
- if !num! equ 3 echo !str1!
- )
- pause
- if !num! lss 3 goto sta
复制代码
|