UNIX Shell implementation in C++