As part of an assignment in OS course, we were asked to make a shell in c with certain features. One of them was piping. I have written a code but am unable to figure out where I am going wrong. The pipe works for 2 command pipes (eg. ls | wc). But for more than two commands, the output of the second command is not going to input of the third command.