The command that will send output from the program `myapp` to both standard output (stdout) and the file `file1.log` is:
D. `myapp | tee file1.log`
The `tee` command is used to read from standard input and write to standard output and files. In this case, it takes the output of `myapp` and both displays it on the terminal and writes it to the file `file1.log`.
The tee command, used with a pipe, reads standard input, then writes the output of a program to standard output and simultaneously copies it into the specified file or files. Use the tee command to view your output immediately and at the same time, store it for future use.
I was wrong, it doesn't show on the screen, only D is valid
upvoted 1 times
...
...
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.
DuboisNicolasDuclair
1 year, 4 months agociola89
1 year, 6 months agocast7omadrid1
5 years, 7 months agocast7omadrid1
4 years, 10 months ago