C Code to minic bash shell utilities