shell.c -c functionality shortened