QuestionQ194

Essential Commands

Given the following command line:

echo "foo bar" | tee bar | cat  

Which of the following outputs is produced?

  • A cat
  • B foo bar
  • C tee bar
  • D bar
  • E foo
Explanation

tee bar copies its standard input to a file named bar and forwards the same data to standard output. cat receives that forwarded data and writes foo bar to standard output.

Community Discussion

No comments yet. Be the first to start the discussion!