Execute a command to retrieve disks list.

@param command
@param callback
542953
function getDrives(command, callback) {
    var child = exec(
        command,
        function (err, stdout, stderr) {
            if (err) return callback(err);
            var drives = stdout.split('\n');

            drives.splice(0, 1);
            drives.splice(-1, 1);

            // Removes ram drives
            drives = drives.filter(function(item){ return item != "none"});
            callback(null, drives);
        }
    );
}
217184
protected void execute(EntityManagerCommand command) {
        try {
            getEntityManagerCommandExecutor().execute(command);
        } catch (javax.persistence.PersistenceException e) {
            throw new PersistenceException(e);
        }
    }
677785
function (command) {
    if (!command || !_.isObject(command)) {
      var err = new Error('Please inject a valid command object!');
      debug(err);
      throw err;
    }

    if (!command.payload && command.payload !== '') {
      command.payload = this.defaultCommandPayload;
    }

    command.defineAggregate(this);

    if (this.commands.indexOf(command) < 0) {
      this.commands.push(command);
    }
  }
508416
function _loadCommandsFromDir(dirPath, disabled, callback) {
    var commands = {};
    fs.readdir(dirPath, function(err, fileNames) {
        if (err) {
            return callback(err);
        }

        // Load each JS file as a command into the session
        _.chain(fileNames)

            // Only accept JS files
            .filter(function(fileName) {
                return (fileName.split('.').pop() === 'js');
            })

            // Pluck out the extension of the file name to get the command name
            .map(function(fileName) {
                return fileName.split('.').slice(0, -1).join('.');
            })

            // Don't accept any from the disabled list of command names
            .difference(disabled)

            // Add each command to the session
            .each(function(commandName) {
                commands[commandName] = require(path.join(dirPath, commandName));
            });

        return callback(null, commands);
    });
}
509049
def storage_command(self, name, method_name=None, command_type=None, oauth=False, generic_update=None, **kwargs):
        
        if generic_update:
            command_name = '{} {}'.format(self.group_name, name) if self.group_name else name
            self.generic_update_command(name, **kwargs)
        elif command_type:
            command_name = self.command(name, method_name, command_type=command_type, **kwargs)
        else:
            command_name = self.command(name, method_name, **kwargs)
        self._register_data_plane_account_arguments(command_name)
        if oauth:
            self._register_data_plane_oauth_arguments(command_name)
1252463
def run(self, command):
        
        if isinstance(command, basestring):
            command = command.split()
        else:
            command = list(command)
        self.external.omero_cli(command)
859185
public function exec($command, $callback = null)
    {
        $this->commandStack[] = [
            'command' => new Command($this->receiveCommand($command)),
            'callback' => $callback,
        ];

        return $this;
    }
455052
function executeBatches(bulkOperation, options, callback) {
  let numberOfCommandsToExecute = bulkOperation.s.batches.length;
  // Execute over all the batches
  for (let i = 0; i < bulkOperation.s.batches.length; i++) {
    executeBatch(bulkOperation, bulkOperation.s.batches[i], options, function(err) {
      // Count down the number of commands left to execute
      numberOfCommandsToExecute = numberOfCommandsToExecute - 1;

      // Execute
      if (numberOfCommandsToExecute === 0) {
        // Driver level error
        if (err) return handleCallback(callback, err);

        const writeResult = new BulkWriteResult(bulkOperation.s.bulkResult);
        if (bulkOperation.handleWriteError(callback, writeResult)) return;

        return handleCallback(callback, null, writeResult);
      }
    });
  }
}
1101832
public static function on($command,callable $callback,$description=''){
      $parts = preg_split('/\s+/',$command);
      static::$commands[array_shift($parts)] = [$parts,$callback,$description];
    }
168189
public static List<String> cmd(String[] command) throws IOException, InterruptedException {
        return cmd(command, null, null, 300000L, null);
    }
342125
public function execute($command, callable $callback = null)
    {
        $this->login();

        return $this->ssh->exec(sprintf('cd %s; %s', $this->directory, $command), $callback);
    }
338287
public static void run(String[] command) throws IOException, RDF4JException, TrustyUriException {
		String cmd = command[0];
		String[] cmdArgs = Arrays.copyOfRange(command, 1, command.length);
		if (cmd.equals("CheckFile")) {
			CheckFile.main(cmdArgs);
		} else if (cmd.equals("ProcessFile")) {
			ProcessFile.main(cmdArgs);
		} else if (cmd.equals("CheckLargeRdf")) {
			CheckLargeRdf.main(cmdArgs);
		} else if (cmd.equals("TransformRdf")) {
			TransformRdf.main(cmdArgs);
		} else if (cmd.equals("TransformLargeRdf")) {
			TransformLargeRdf.main(cmdArgs);
		} else if (cmd.equals("CheckSortedRdf")) {
			CheckSortedRdf.main(cmdArgs);
		} else {
			System.err.println("ERROR: Unrecognized command " + cmd);
			System.exit(1);
		}
	}
191434
public void execute(Runnable command) {
        if (!(command instanceof ClusteredFutureTask)) {
            command = new ClusteredFutureTask<Object>(command, null);
        }
        command.run();
    }
1162999
function(command, callback) {
    var self = this;
    return new Promise(function(resolve, reject) {
        var prCB = function(err, data) {
          if (err) {
            log.error(err.message);
            log.debug(command);
          }
          return (err ? reject('err') : resolve(data));
        };
        self.connection.execute(command, function(err, result) {
          prCB(err, result)
        });
    });
  }
678896
public static void exec(final boolean wait, final String command, final String... parms)
            throws IOException
   {
      String[] commandTokens = parms == null ? new String[1] : new String[parms.length + 1];
      commandTokens[0] = command;

      if (commandTokens.length > 1)
      {
         System.arraycopy(parms, 0, commandTokens, 1, parms.length);
      }

      Runtime.getRuntime().exec(commandTokens, null);
   }
340632
def _send_command_list(self, commands):
        """"""
        output = ""
        for command in commands:
            output += self.device.send_command(
                command, strip_prompt=False, strip_command=False
            )
        return output
343369
function getList() {
  if(!COMMAND_LIST) {
    COMMAND_LIST = [];
    for(var z in this.execs) {
      COMMAND_LIST.push(this.execs[z].definition.getDefinition());
    }
  }
  return COMMAND_LIST;
}