I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out | tee -a /root/tmp.txt 2>&1 &
./a.out > /root/tmp.txt 2>&1 &
The issue which I am facing is, this was not redirecting any output to tmp.txt until it reaches some 100 lines number, once those many lines were reached it is dumping all the output to the file. And here also during this dumping I am loosing some 20 lines.
Any help is greatly appreciated.