文档怎么做 powershell如何读txt文档?
powershell如何读txt文档?例如,文本内容:[IP配置]1 192.168.1.99 56次2 192.168.3.99 55次3 192.168.1.49 54次4 192.168.1.2
powershell如何读txt文档?
例如,文本内容:[IP配置]1 192.168.1.99 56次2 192.168.3.99 55次3 192.168.1.49 54次4 192.168.1.23 53次5 192.168.2.10 52次[url配置]1索引.html56次2%上传a.jpg 55次3默认.asp54次4imagesb.jpb 53次5imgc.bmp 52次仅取前3次行$s=GC“E:1.txt”$ip=[array]::IndexOf($s,“[ip Config]”)$url=[array]::IndexOf($s,“[url Config]”)$s[($ip 1)…($ip 3)];输出文件E:ip.txt文件$s[($url 1)…($url 3)]|输出文件e:%url.txt文件