wc -l on windows
So you have a set of txt files that contain data and you would want to count the number of lines/records in those files.
Naturally you would use wc -l, but then you realise that you are on windows.
Here is one solution that can be used:
for /f %g in ('dir /b *.txt') do type %g | find /v /c "ZZZZCCCC"
Assuming that you knnow for sure that there is no line that would contain the string "ZZZZCCCC".
Comments
Post a Comment