Linux Foundation Certified System Administrator (LFCS) — Question 39

When given the following command line.
echo "foo bar" | tee bar | cat
Which of the following output is created?

Answer options

Correct answer: B

Explanation

The correct answer is B, as the 'echo' command outputs 'foo bar', which is then passed through 'tee' and 'cat'. The 'tee' command writes the output to 'bar' but also passes it through to 'cat', which will display 'foo bar'. Options A, C, D, and E do not represent the complete output generated by the command.