Determine the type of output stream of a command
by unstamped from LinuxQuestions.org on (#6HDFC)
Merry Christmas!
I was doing a shallow comparison between programs with strace and wanted to pipe the output to wc to count the number of calls. I wasn't aware that strace outputs to the standard error stream.
This being said, is there any way to check if a command outputs to standard error or standard output?
In my specific case, since strace link x y | wc -l failed, it was a sign that it wasn't standard output.
Thank you.
I was doing a shallow comparison between programs with strace and wanted to pipe the output to wc to count the number of calls. I wasn't aware that strace outputs to the standard error stream.
This being said, is there any way to check if a command outputs to standard error or standard output?
In my specific case, since strace link x y | wc -l failed, it was a sign that it wasn't standard output.
Thank you.