The problem I am facing is the need to write to stdout and to another file. I want the output to be displayed on the screen and into the file. This program is similar to the script command already available, but it is very simplified.
Anyway. So far I have found it simple to write to two file descriptors going to place (dup/dup2) but what I want to do is the opposite.
So, like this:
--<==
not like this:
==>--.
Make sense?
I don't have any code yet, as I am solving the problem before I start to code.
Thanks for your time!