Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Why does piping work with some commands, but not with others ? How can
I circumvent this issue ?
Redirect the output is possibleThis can be achieved in several ways, by using pipepipe|, or by using the file descriptor STDERRSTDERR2>, or by using the xargs command.
In your case:Example using xargs
ls 2>| xargs echo
Why does piping work with some commands, but not with others ? How can
I circumvent this issue ?
Redirect the output is possible using pipe| or by using the file descriptor STDERR2>
In your case:
ls 2> echo
This can be achieved in several ways, by using pipe|, or STDERR2>, or by using the xargs command.