且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Windows命令提示符下分割命令输出?

更新时间:2022-11-02 23:18:13

p>没有完全一个拆分函数,但你可以使用 FOR 来完成你想要的:

there is not exactly a split function, but you can use FOR to accomplish what you want :

for /f "tokens=2 delims=:" %%i  in ('ipconfig ^| findstr /i "Default gateway" ^| findstr [0-9]') do echo %%i