Custom shell implementing some functions of shell in C