Where warnings go in a pipeline

A build script build.sh writes progress lines such as compiled main.o to standard output and writes each warning, such as warning: unused variable, to standard error. In an interactive terminal you run ./build.sh | grep -c warning, and the script emits 3 progress lines and 5 warnings. What appears on the terminal?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More The Shell Questions: