Connecting n commands with pipes in a shell?
Nothing complex here, just have in mind that the last command should output to the original process’ file descriptor 1 and the first should read from original process file descriptor 0. You just spawn the processes in order, carrying along the input side of the previous pipe call. So, here’s are the types: #include <unistd.h> … Read more