Some programs would prefer to output the help message in stderr. I want to search the help message with grep command, xx /? | grep regex?
xx /? | grep regex
How could i do this?
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
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3 years ago