Implemented Ctrl-D  exit from shell