Shell implementation in C