从 Powershell 输出中删除空行 [英] Remove Empty Lines From Powershell Output
本文介绍了从 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
这篇关于从 Powershell 输出中删除空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文