Powershell - after a count how to trim line -


I'm using the following to count with netstat but counting on the next line is visible. Here's what I'm doing

  $ LIST = (netstat -an | select-string 443 | select-string "LISTENING"). Type "LISTENING:" $ LIST & gt; & Gt; D: \ entNew.txt   

is output:

  LISTENING: 40   

How do I get the output To type in:

  LISTENING: 40    

< P> Just test your case:

"listen: $ list" & gt; & Gt; D: \ entNew.txt

However, I have & gt; & Gt; but do not use set-content CmdLet, and I have a regular expression to filter the output of a netstate.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -