I am using grep on windows to filter a file and would like to pipe the output to another batch script.
e.g.
grep "foo" bar.txt | mybatch.bat
and in mybatch i would like to process each matching line
e.g. mybatch.bat:
echo Line with foo: %1
on linux I can solve this via
grep "foo" bar.txt | while read x; do mybatch.sh $x; done
but no idea how I can do this on a windows machine.
Thanks in advance!