Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on "Rules" that terminal programs follow. Parent comment
foo 2>&1 >&- | grep ...
Alternatively, if you only want to grep to see the stderr, but you still want to see stdout, you can swap stderr and stdout like this:
foo 3>&2 2>&1 1>&3 | grep ...
foo > >(grep stdout) 2> >(grep stderr)
There are no comments on this comment yet.
Alternatively, if you only want to grep to see the stderr, but you still want to see stdout, you can swap stderr and stdout like this:
And in many shells, you can easily split the stdout and stderr into two separate pipelines like this: