PrepAway - Latest Free Exam Questions & Answers

Which of the following command lines will do this?

You want the command foo to take its input from the file foobar and send its output to the program bar.

Which of the following command lines will do this?

PrepAway - Latest Free Exam Questions & Answers

A.
foo < foobar | bar

B.
foo < foobar > bar

C.
foo | foobar > bar

D.
foo | bar < foobar

E.
foo > bar < foobar

Explanation:
B) would redirect output into a file called bar (overwriting an existing bar)
C) would pipe output of foo to foobar
D) would call foo then bar with the input of foobar
E) would redirect stdin to file foobar and stdout into file bar (overwriting an existing bar)


Leave a Reply