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

Sync multiple git repo at once

Use the following command in Linux will do the job:  ls -d RepoNames* | xargs -I{} git -C {} pull