Implementation of a shell environment in C