below is the program i have written to redirect the output to file using my own file descriptor. Iam able to successfully redirect the output to a file .
But the problem iamm facing is that , after closing my file descriptor still my programs writes the output to the file
How to solve this problem , any help is really appreciated
#script to create our own file descriptor
#redirect standard output to file descriptor 4
echo "This is a test program"
echo " Back to normal"
# i want the output back to normal to be displayed on the screen , but it is getting stored in the file
Any help is really appreciated.