This runs the command you send in
181426
def _run_mpi_cmd(self, cmd):
        
        log("Number of Processes: {0}".format(self.num_processors))
        time_start = datetime.utcnow()

        # Construct the taudem command line.
        cmd = [self.mpiexec_path, '-n', str(self.num_processors)] + cmd
        log("Command Line: {0}".format(" ".join(cmd)))
        process = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False)
        out, err = process.communicate()
        if out:
            log("OUTPUT:")
            for line in out.split(b'\n'):
                log(line)
        if err:
            log(err, severity="WARNING")
        log("Time to complete: {0}".format(datetime.utcnow()-time_start))
667712
def run_command(self, command, arg=None, is_eval=False):
        
        mode = is_eval and 'eval' or 'command'

        if isinstance(arg, tuple):
            name, d = arg
        else:
            name, d = arg, {}

        result = getattr(self.connection.admin, mode)(command, name, **d)
        return result
592064
function exec() {

  var actions = {
    commands: {
      init: { action: _init },
      run : { action: _run }
    }
  };

  cli.command(__dirname, actions);
}
411915
def runCmd(cls, cmd):
        
        cit.echo(cmd, "command")
        result = os.system(cmd)
        cls.checkResult(result)
1358885
def run(self):
        

        if self.args['add']:
            self.action_add()

        elif self.args['rm']:
            self.action_rm()

        elif self.args['show']:
            self.action_show()

        elif self.args['rename']:
            self.action_rename()

        else:
            self.action_run_command()
1243801
def SendCommand(self, Command):
        
        try:
            self._Api.send_command(Command)
        except SkypeAPIError:
            self.ResetCache()
            raise
1052997
def run_command(meth, *args, &block)
      runner = @parallel ? :run_command_parallel : :run_command_serial
      self.send(runner, meth, *args, &block)
    end
1173487
protected function runCommands()
    {
        // Load Remote directory
        $remote    = $this->argument('remote');
        $directory = Config::get('remote.connections.'.$remote.'.root');

        // Define commands
        $commands = array_merge(['cd '.$directory], Config::get('vdeploy::config.commands'));
        $commands = array_filter($commands);

        // Parse tags in command
        if (!$this->parseTags($commands)) {
            return false;
        }

        // Run Commands
        SSH::into($remote)->run($commands);

        return true;
    }
1320282
def __send_command(self, command, args=[]):
        ''''''
        self.ws.send(json.dumps({"op": command, "args": args}))
847429
@Override
	public void run()
    {
        String command = globalSettings.getStringProperty(FFMQAdminClientSettings.ADM_COMMAND, null);
        if (StringTools.isEmpty(command))
        {
            err.println("No command specified");
            return;
        }
        
        try
        {
            openSession();
            processCommand(command);
        }
        catch (JMSException e)
        {
        	logError(e);
        }
        finally
        {
        	closeSession();
        }
    }
943333
def execute_command(self, cmd, params=None, callback=None, raw=False):
        '''
        
        '''
        def execute_with_callbacks(cmd, params=None, callback=None, raw=False):
            code, params = self.send_command(cmd, params, raw)
            if callback:
                callback(code, params)
            return code, params

        if self.daemon:
            t = Thread(target=execute_with_callbacks,
                    args=(cmd, ), kwargs={'params':params, 'callback':callback, 'raw':raw})
            t.daemon = True
            t.start()
        else:
            return execute_with_callbacks(cmd, params, callback, raw)
1015701
def run(cmd)
      cmd = @before_run_block.call(cmd) if @before_run_block
      return false unless cmd
      say "!txtgrn!> #{cmd}" unless Runfile.quiet
      system cmd
      @after_run_block.call(cmd) if @after_run_block
    end
492530
def run_cmd(self, *args, **kwargs):
        
        timeout = kwargs.pop('timeout', None)
        p = self.raw_cmd(*args, **kwargs)
        return p.communicate(timeout=timeout)[0].decode('utf-8').replace('\r\n', '\n')
394115
def execute(self, command):
        

        logger.info("running command %s", command)
        cmd = ["podman", "exec", self.get_id()] + command
        output = run_cmd(cmd, return_output=True)

        return output
592571
def run(command, **kwargs):
  
  print command
  p = Popen(shlex.split(command), **kwargs)
  p.wait()

  return p.returncode
362227
def _run(self):
        
        cmd = self.read_command()
        if cmd["command"] == "next":
            self.next_tuple()
        elif cmd["command"] == "ack":
            self.ack(cmd["id"])
        elif cmd["command"] == "fail":
            self.fail(cmd["id"])
        elif cmd["command"] == "activate":
            self.activate()
        elif cmd["command"] == "deactivate":
            self.deactivate()
        else:
            self.logger.error("Received invalid command from Storm: %r", cmd)
        self.send_message({"command": "sync"})
335480
function runCommand(command, options) {
    let cmd = getCommand(command);
    if (!cmd || command === 'help') {
      cmd = getCommand('help');
    } else {
      try {
        validateConfig(options);
      } catch (error) {
        console.log(error.message);
        process.exit(1);
      }
    }
    let fn = cmd.callback;
    let opts = mapParams(cmd, options);
    fn(opts).then(function (result) {
      if (cmd.formatter) {
        cmd.formatter.format(result.messages, options);
      } else {
        console.log(result);
      }
    }).catch(function (error) {
      let formatter = new formatters.MessageFormatter();
      if (error.response) {
        console.log(error);
        formatter.format(['Error response received: ' + error.response.data.errors[0].message]);
      } else {

        formatter.format([error.message]);
      }
      process.exit(1);
    });
  }