你可以使用以下的批处理脚本来提取txt文档中的ip_prefix值:

@echo off
setlocal enabledelayedexpansion

set "inputFile=input.txt"
set "outputFile=output.txt"

(for /f "tokens=2 delims=: " %%a in ('type "%inputFile%" ^| findstr /c:"ip_prefix"') do (
    echo %%a
)) > "%outputFile%"

echo 提取完成,结果保存在 %outputFile% 文件中。

将上述代码保存为一个批处理文件(例如extract_ip_prefix.bat),并确保在同一目录下有一个名为input.txt的文本文件,其中包含要提取的ip_prefix值。

运行批处理文件后,提取的结果将保存在output.txt文件中。


原文地址: https://www.cveoy.top/t/topic/iL9v 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录