How to pipeline stderr in cmd.exe?
Some programs would prefer to output the help message in stderr. I want to search the help message with grep command, xx /? | grep regex?
How could i do this?
1 Answer
You can redirect stderr to stdout by using 2>&1, and then pipe stdout into grep.
So, what I think you want is this:
xx /? 2>&1 | grep regex 4