shell.c redundant code removed