Here's why:
The echo command is used to output the string "foo bar" to standard output.
The | symbol is used for pipe redirection to send the output of the echo command to the tee command as input.
The tee command is used to read its standard input and write it to both standard output and a file named bar.
The | symbol is used again for pipe redirection to send the output of the tee command (which is the same as the input it received) to the cat command as input.
The cat command is used to read its standard input and output it to standard output.
So, when the command line is executed, the output "foo bar" is first written to standard output by the echo command. This output is then piped to the tee command, which writes it to standard output (where it is displayed on the terminal) and to the file bar. Finally, the output is piped to the cat command, which reads it from standard input and writes it to standard output (again displaying "foo bar" on the terminal).
Therefore, the output of the command line is just the string "foo bar".
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.LX0-103 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
linux_admin
2 years, 2 months ago