Developing own shell

Hi everyone.I am trying ti create my own shell in C.So far i have managed to create a parser to separate args from cmd line of my shell.(i have done nothing different for tokens is that wrong?).so i can run commands like "ls -l" "cp" "cat" etc.now i want to add redirection.can anyone guide me through this process?i have read many things but i am a little bit confused.(after that there is pipelining,bg jobs, etc).
thanks in advance.

This is often a third year project assignment in college. We do not allow homework here.
If you want to develop your own shell there is a step by step book on how to do it -
'Linux Application Development' by Johnson & Troan.