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?
$ gcc test.c $ ./a.out > log.txt $
Advertisement
Answer
You could use tee
:
$ ./a.out | tee log.txt
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?
$ gcc test.c $ ./a.out > log.txt $
You could use tee
:
$ ./a.out | tee log.txt