Hmm... you're method seems more logical... But I think I've done the same thing, the only difference being that I've written a few extra lines of code
I know it was a mistake that was supposed to have been rectified in the beginning but I've already written my parser and it gives me something like:
argv[0] = ls
argv[1] = -la
argv[2] = |
argv[3] = wc
argv[4] = |
argv[5] = wc
for an input like "ls -la | wc | wc"
I am able to get it to work for "ls -la | wc" but the next thing is what is puzzling me... Is it possible using the architecture that I've written?
And yeah, thanks for the tip on redirection... Will attempt that tomorrow