I am writing my own shell in C, I wrote this code to implement piping.
But if I want to redirect the final output to a file rather than standard output, How do I do that?