implementation of shell in c