shell.c: replace write to printf
shell.c: replace prompt string from variable to macro
shell.c: refine code to improve readability