@echo off & setLocal EnableDELAYedExpansion
for /f "tokens=* delims=" %%a in (myfile) do (
find /c "%%a" < myfile & echo %%a
a minor performance issue with this algorithm: let's analyse it for a file with 1000 names.
first the for loop will be looping 1000 times. then, the find command will be called 1000 times. Also, say there are 50 janes, why would you want to find the number of jane again when the first time round, the number of janes is already found.?
GNU win32 packages | Gawk