How to redirect output away from /dev/null
- by Gowtham
I have an application that runs the a command as below:
<command> >& /dev/null
I have no control on this. All the o/p generated by this command goes to /dev/null. I want the output to be visible on screen or redirected to a log file.
I tried to use freopen() and related functions to reopen /dev/null to another file, but could not get it working.
Do you have any other ideas? Is this possible at all?
Thanks for your time.
PS: I am working on Linux.
-Gowtham