Start over my entire shell? I could easily just break things up into functions rather than rewriting the entire thing(which I don't think I'll have time, it's due in less than a week, and I also have to code redirection, statements, conditionals, and while loops). The file I posted is just a tiny bit of the whole thing, I have at least 1500 lines of code total, probably more.

Do you know a basic outline of how I could recursively call processline while looping through each sub-command? I need to pass it an input-file-descriptor and an output-file-descriptor, so would I need two pipe variables to do this? I just can't seem to figure out how to do it with one.

Replace processline() with several more specialized functions. So have a function that parses the line, then a function that iterates through tokens, and another function that actually does the heavy lifting of creating pipes and spawning.