我在 Powershell 中使用以下脚本(版本为 5.1):
Get-Content -Path path\to\text\file\to\be\read.txt -Wait
现在,即使文件没有更新,它也会继续读取。在文本文件中找到特定行后如何停止?有没有其他方法可以阻止这种情况?
powershell pipeline break powershell-5.0
break ×1
pipeline ×1
powershell ×1
powershell-5.0 ×1