I'm using grep deployed with Git for Windows. This used to allow me to detect if an environment variable contained a substring (case insensitive).
echo abc | "C:\Program Files\Git\usr\bin\grep.exe" -iqF d if errorlevel 1 (echo Not present) else (echo Present) However, the -F option is no longer working. I need it because the string being searched for may contain special characters for regex. I need a simple string search not pattern matching. Errorlevel is now something like 34304, and it prints to stderr: 0 [main] grep 747 cygwin_exception::open_stackdumpfile: Dumping stack trace to grep.exe.stackdump You can easily obtain a stack trace by running the command above. Keith Robertson R&D Core Platform C | 678.570.7667 krobert...@vmware.com<mailto:krobert...@vmware.com> Interact with AirWatch<http://www.air-watch.com/> via Twitter<https://twitter.com/AirWatch>, LinkedIn<http://www.linkedin.com/company/283586?trk=tyah> and Google+<https://plus.google.com/u/0/106579500291096176030/posts> [VMware AirWatch]<http://www.air-watch.com/> This communication is confidential and is intended to be privileged pursuant to applicable law. If you are not a designated recipient of this message, please do not read, copy, use or disclose this message or its attachments. Notify the sender by replying to this message and delete or destroy all copies of this message and attachments in all media. Thank you.