Monday, December 2, 2019

Windows equivalent of "wc -l" command in Linux

To count the number lines of files / stdout in Linux, we uses "wc -l" to achieve. In Windows, we use the following instead:
  • find /c /v ""

For example, suppose we have a file "sample_file.txt" and we want to know the number of lines of that file, we can perform the following:
  • type sample_file.txt | find /c /v ""



No comments:

Post a Comment

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...