The below program redirects all my output to log file. I need to display all the output along with log file. How can this be achieved?
JavaScript
x
$ gcc test.c
$ ./a.out > log.txt
$
Advertisement
Answer
You could use tee
:
JavaScript
$ ./a.out | tee log.txt