I am trying to grep multiple strings on multiple files. This is on Windows 7 x64, and I am using GNUWin32's flavor.
I have grep.bat with this command:
grep "string1\|string2\|string3\|string4" 20*.csv > out.csv
There's actually 68 strings, and they are 11 characters each, so the string within the quotes is 869 characters long (this includes the 2 character delimiters).
What is happening is I am getting an out.csv, but all it's doing is alternating between 0 bytes and a copy of my grep command! Huh? Why is grep searching a .bat file when I explicitly told it to check only files matching 20*.csv?
If I remove
> out.csv and run the .bat again, then all I get is my command line repeated over and over in a command prompt window.