read-command.c from master