4 ms·
As many others have said, please disregard this advice. OP (and others), if you're using zsh or bash, just use |& instead of |. That's all you have to do
by hn92726819 3y ago
As many others have said, please disregard this advice.
OP (and others), if you're using zsh or bash, just use |& instead of |. That's all you have to do
command --help |& less
It's shorter than 2>&1 and it does the same thing.
- globular-toast 3y agoGood tip, but what the OP said is still valid. You shouldn't need to speculatively use |& then redo when you get interleaved rubbish.
- hn92726819 3y agoI think that's personal opinion though. IMO, stdout is used for anything that might make sense to pipe to another program. Help output doesn't generally make sense to send down the line, so don't send it to stdout. Fine if you do, but a general rule should be human consumption is sent to stderr. Also I wasn't suggesting to speculatively use |&, I was saying to always use it when adding --help, so you don't have to speculate