code: private void executeCommand(String command, List<String> arguments) {
  
          try {
              CmsShellCommandResult result = m_remoteShell.executeCommand(command, arguments);
              m_out.print(result.getOutput());
              updateState(result);
              if (m_exitCalled) {
                  exit(0);
              } else if (m_hasError && (m_errorCode != -1)) {
                  exit(m_errorCode);
              }
          } catch (RemoteException r) {
              r.printStackTrace(System.err);
              exit(1);
          }
      }
docs: Executes a command remotely, displays the command output and updates the internal state.<p>
  
  @param command the command
  @param arguments the arguments