Code Project

Link Unit

Showing posts with label LOC. Show all posts
Showing posts with label LOC. Show all posts

Monday, July 26, 2010

LOC in DOS

Though LOC for estimation is not very reliable , but still in case you need to find LOC of existing project. One way is to write a piece of code in your preferred language C#/VB.Net etc or another way is using some command like wc -l as in Linux.
In DOS there is no such command directly availiable , so how to go about this one?? I assume nobody is going to write pharse "I am genius" in deployed code.
So the trick is to find nonexisting text[/v] in lines and count those lines [/c]. For this to work copy all the source code files in one directory and run the following
C:\CS> find "I am genius" /c/v *.cs >ABC
Hope it helps