Article 6HDFC Determine the type of output stream of a command

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.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments