Count the lines in a text file which contain the string "
Under linux: No Problem:
grep "<value>" file.xml | wc -lUnder windows? I fought my temptation to copy the file over to linux and to do it there. I really though, ok, what if I was a windows developer who didn't know about linux or cygwin... There should be a way!
One suggestion was to use Find & Replace and usually there is a dialog box at the end saying "Replaced 486 occurrences".
But I thought, that can't be it. I did some googling and was surprised!
Windows has a find in its good old MS DOS shell!!
C:\> find /C "<value>" file.xmlWow, it returned the number of occurrences formatted in a weird way. But it works.
Crazy...
I should use Windows more often...