从 Powershell 输出中删除空行
问题描述:
我的所有 cmd 输出在 powershell 中都有一个小问题.我必须在屏幕上看到一个简短的 cmd 结果.具体来说,这是我的问题之一:
i've a little problem in powershell with all my cmd output. I have to see on the screen a short cmd result. In the specific this is one of my problem:
命令
PS C:\C_Directory> ls -Filter *.err|Measure-Object -Line| fw
1
如您所见,Format Wide 输出带有更多空行.我如何转换此输出:
As you can see, the Format Wide output it's with more empity lines. How can i transfor this output in :
1
提前致谢.
答
试试这个
ls -Filter *.err|Measure-Object -Line | select -expand lines