|if you enter id as "tom", and you have |
tom jones, black
jones tome, jblack
the batch using findstr like that will return both these lines as well, BUT the id is not tom. This is undesirable, right? in this case, you should also check your %%b for correct user id.
for /f "tokens=1,2* delims=," %%a in ( 'type csvfile') do (
check for %%b whether is equal to %_id%
if yes, get your username at %%a
GNU win32 packages | Gawk