It is known that the number of lines of text counted under Linux can be used with the Wc-l command. Like what:
-bash-3.2$ Cat Pif_install.log | Wc-l
712
But how to count the number of lines of output text under Windows, the answer is to use the FIND/C command
1. Count The number of rows that include a string .
such as the number of time_wait when the network connection is counted.
Netstat-an | find/i/C "Time_wait"
The/I parameter here ignores uppercase and lowercase. The/c parameter is the number of rows or records that are counted to include the "time_wait" string.
2. Count the total number of rows . Find also has an option/C. means the number of rows that do not include a string, which enables you to count the number of lines of text. Like what:
C:\users\nr>type Test.txt | find/v/C ""
253
Note: Empty lines in the file are not counted except for the last blank line. The remaining empty rows are counted correctly.
Commands for counting the number of rows under Windows