抄来的一段代码,文本里有三行有“物理地址”这个字眼,我只需要第一行的,要怎样改?复制代码
- find "物理地址" ipconfig.txt >phyaddr.txt
复制代码
- find "物理地址" < ipconfig.txt > phyaddr.txt
- set /p v=<phyaddr.txt
- >phyaddr.txt echo,%v%
复制代码
- @(find "物理地址" |cmd /v /c set /p str=^&echo !str!)< ipconfig.txt >phyaddr.txt
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |