回复 4# learninger
- @echo off &setlocal enabledelayedexpansion
- (for /f "delims=" %%i in (testin.txt) do (
- echo,%%i
- set "r1="
- for /f "delims=" %%s in ('..\ipmitool.exe xxx ^| findstr /c:"Product Serial" ') do if not defined r1 (set "r1=%%s")
- echo,!r1!
- ))>result.txt
- endlocal &exit/b
复制代码
|