LPI Exam Questions

Which of the following commands will send output from the program myapp to both stdout and the file

Which of the following commands will send output from the program myapp to both stdout and the file file1.txt?

A.
cat < myapp | cat > file1.txt

B.
myapp 0>&1 | cat > file1.txt

C.
myapp | cat > file1.txt

D.
myapp | tee file1.txt

E.
tee myapp file1.txt

Explanation:
From the man pages:
tee – read from standard input and write to standard output and files