Hi all,
I need some help from you guys. What I want to do is redirect the streams. For eg. Suppose we give ls > /dev/null, it redirects the STDOUT to /dev/null, but the STDERR remains to be console. Suppose I have a program which prints numbers from 1 to 999999 on STDOUT and a random string on STDERR for each corresponding number in STDOUT. Now let that program be called myprog. I run it in the background on the shell prompt. # myprog & 1 sdfsf 2 sdsdf ..... 7563 ...
Now, I want to redirect the STDOUT and STDERR of the running background process to some files , say r1.txt or r2.txt without stopping or affecting the process.
Inshort, the streams should be redirected at runtime. Please help me out... any trick or utility program or anything that I can do for it is welcome.
Thanx in advance.
Akhilesh.
-- ********************************************************** * Never say die unless you are dead ! * * .oooO * * ( ) Oooo. Only those who will risk going too far * * \ ( ( ) Can possibly find out how far one can go!* * _) ) / * * (_/ http://www.it.iitb.ac.in/~akhilesh/ * **********************************************************