Preparing a new machine for development, I upgraded Cygwin and the CVS client as described in the subject line: from (Cygwin 1.5.5-1 + CVS 1.11.21) to (cygwin-1.7.5 + CVS 1.11.22)
All went well, but a 1-line convenience bash script I have been carrying around for years stopped working. It used to filter out all uninteresting lines from 'cvs status':
cvs status | grep -F File | grep -v Up-to-date
In the new version, it seemed as if "grep -v" simply stopped working (i.e. wasn't filtering OUT anything). So I tried:
cvs status 2>&1 | grep -F File | grep -v Up-to-date
But that didn't change the behavior. The output was still as if "grep -v" were never called. So, I tried:
cvs status 2>&1 | grep -F File 2>&1 | grep -v Up-to-date
And that solved the problem! The script now behaves identically in (Cygwin 1.5.5-1 + CVS 1.11.21) and (cygwin-1.7.5 + CVS 1.11.22).
My question now is why?
What happened to Cygwin's grep that it now requires redirection from stderr to stdout?
Please note that I intentionally emphasized the word script, because the original command (the first one quoted above) still works identically in both old and new environments, if typed from the command line (i.e. not inside a #!/bin/bash script).
Any idea why this is?