Sunday, July 12, 2015

Windows batch: Counting a number of lines

> find /c /v ""  is equivalent of  $ wc -l

Example: Number of half open ports in Windows and Linux
> netstat -na | find -i "syn_received" | find /c /v ""
# netstat -na | grep -i "syn_recv" | wc -l 

No comments:

Post a Comment