In fact, using a combination of fork and exec is how most command line shells (e.g., Bash) are implemented. See this page for a good reference on Unix system calls - in particular, I'd recommend reading the (very brief) section on fork and wait. Just following those sections is an example of implementing a simple shell program using fork, exec, and wait.