command - string
12230
function blueRadiosAT(command){
	if (! wsclient.listeners('notification').length) {
		console.log('subscribe to RX notification');
		//listen for notification response
		wsclient.on('notification', function(peripheralId, serviceUuid, characteristicUuid, data) {
	//		console.log("NOTIFICATION: " + data.toString('hex') + ' : ' + data.toString('ascii').yellow);
			console.log(data.toString('ascii').trim().yellow);
		});		
	}

	//convert command to hex, add CR (0x0d = \r) at the end
	var hexCommand = new Buffer(command + '\r','ascii');

	wsclient.notify(peripheralId, blueRadiosService,blueRadiosRxCharacteristic,true, function() {
		wsclient.write(peripheralId, blueRadiosService,blueRadiosCmdCharacteristic, new Buffer('02','hex'), false, function(error) {
			console.log('Switch to CMD mode');
			wsclient.write(peripheralId, blueRadiosService, blueRadiosTxCharacteristic, hexCommand, false, function(){
				console.log('sent CMD: ' + command.cyan);
			})
		})
	});
}
1260232
function _execCmd(cmdStr, cmdDesc) {
  const cmdReturnCode = exec(cmdStr).code;

  if (cmdReturnCode !== 0) {
    echo(`Error: Failed to ${cmdDesc}`);
    exit(cmdReturnCode);
  }
}
644451
def escape_windows_cmd_string(s):
    
    for c in '()%!^<>&|"':
        s = s.replace(c, '^' + c)
    s = s.replace('/?', '/.')
    return s
627969
private static String showCommandAliases() {
        final Command[] commands = Command.values();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < commands.length; ++i) {
            if (i != 0) {
                sb.append(", ");
                if (i == commands.length - 1) {
                    sb.append("or ");
                }
            }
            sb.append("`--");
            sb.append(commands[i].getAlias());
            sb.append("`");
        }
        return sb.toString();
    }
429101
def as_string(self):
        """"""
        if type(self.instruction) is str:
            return self.instruction

        if self.action == "FROM" and not isinstance(self.command, six.string_types):
            extra = "" if self.extra is NotSpecified else " {0}".format(self.extra)
            return "{0} {1}{2}".format(self.action, self.command.from_name, extra)
        else:
            return "{0} {1}".format(self.action, self.command)
93587
function echo(command) {
        return command.getUser()
            .then((user) => {
                const content = (command.parent.text || '').split('\n').map((line) => `> ${line}`);
                content.unshift(`@${user.username} said:`);
                command.reply(content.join('\n'));
            });
    }
789565
def cmd():
    ''''''

    # Try to handle any reasonable thing thrown at this.
    # Consume '-f' and '-o' as input/output, allow '-' for stdin/stdout
    # and treat any subsequent arguments as a space separated string to
    # be titlecased (so it still works if people forget quotes)
    parser = argparse.ArgumentParser()
    in_group = parser.add_mutually_exclusive_group()
    in_group.add_argument('string', nargs='*', default=[],
            help='String to titlecase')
    in_group.add_argument('-f', '--input-file',
            help='File to read from to titlecase')
    parser.add_argument('-o', '--output-file',
            help='File to write titlecased output to)')

    args = parser.parse_args()

    if args.input_file is not None:
        if args.input_file == '-':
            ifile = sys.stdin
        else:
            ifile = open(args.input_file)
    else:
        ifile = sys.stdin

    if args.output_file is not None:
        if args.output_file == '-':
            ofile = sys.stdout
        else:
            ofile = open(args.output_file, 'w')
    else:
        ofile = sys.stdout

    if len(args.string) > 0:
        in_string = ' '.join(args.string)
    else:
        with ifile:
            in_string = ifile.read()

    with ofile:
        ofile.write(titlecase(in_string))
339365
function CommandLine(commands) {
  this.keys = Object.keys(commands);
  this.commands = commands;
  this.args = process.argv.slice(2);
  this.context = this.args[0] || null;
  this.help = {
    before: '',
    after: ''
  }
}
573639
def command(self, cmd, *args):
        
        self._serial_interface.command(cmd)
        if len(args) > 0:
            self._serial_interface.data(list(args))
164562
def sh(*command)
      $stderr.puts "$ " + command.join(" ") if $VERBOSE
      stdout, stderr, status = Open3.capture3(*command)

      stdout.chomp!
      stderr.chomp!

      if $DEBUG
        $stderr.puts stdout.gsub(/(?<=\n|\A)/, "--> ") unless stdout.empty?
        $stderr.puts stderr.gsub(/(?<=\n|\A)/, "--! ") unless stderr.empty?
      end

      unless status.success?
        error_string = Shellwords.join(command)
        error_string << "\n"

        stderr = "<no output>" if stderr.empty?
        error_string << "  " << stderr.chomp

        raise CommandError, "[ERROR] #{error_string}"
      end

      if block_given?
        yield [stdout, stderr]
      else
        stdout
      end
    end
785003
def at(host, command, seq, params):
    
    params_str = []
    for p in params:
        if type(p) == int:
            params_str.append('{:d}'.format(p))
        elif type(p) == float:
            params_str.append('{:d}'.format(f2i(p)))
        elif type(p) == str:
            params_str.append('"{:s}"'.format(p))
    msg = 'AT*{:s}={:d},{:s}\r'.format(command, seq, ','.join(params_str))
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.sendto(msg.encode(), (host, ardrone.constant.COMMAND_PORT))
243029
def exec(self, command_str, **command_env):
		
		env = self.__vars.copy()
		env.update(command_env)

		command_tokens = WCommandProto.split_command(command_str)
		command_obj = self.commands().select(*command_tokens, **env)
		if command_obj is None:
			raise WCommandSet.NoCommandFound('No suitable command found: "%s"' % command_str)

		result = command_obj.exec(*command_tokens, **env)
		self.__track_vars(result)
		return result
198361
def cli(ctx, pattern, arguments, safe):
    """"""

    matches = utils.grep_commands(pattern)
    if matches:
        selected = utils.select_command(matches)
        if selected >= 0:
            cmd, desc = matches[selected]
            pcmd = utils.create_pcmd(cmd)
            raw_params, params, defaults = utils.get_params_in_pcmd(pcmd)

            arguments = list(arguments)
            kargs = {}
            for r, p, d in zip(raw_params, params, defaults):
                if arguments:
                    val = arguments.pop(0)
                    click.echo("{}: {}".format(p, val))
                    kargs[r] = val
                elif safe:
                    if d:
                        kargs[r] = d
                else:
                    p_default = d if d else None
                    val = click.prompt("Enter value for '{}'".format(p), default=p_default)
                    kargs[r] = val
            click.echo("\n")

            final_cmd = utils.substitute_pcmd(pcmd, kargs, safe)

            command = "$ {} :: {}".format(final_cmd, desc)
            if click.confirm("Execute\n\t{}\n\n?".format(command), default=True):
                os.system(final_cmd)
    elif matches == []:
        click.echo('No saved commands matches the pattern {}'.format(pattern))
    else:
        click.echo("No commands to run, Add one by 'keep new'. ")
1238015
def command(self, command):
        
        return self._conn.command('[con_id="{}"] {}'.format(self.id, command))
1058643
void contextCommandString(StringBuilder buf, String uri, Context.Status status, String path, List<String> alias, String jvmRoute) {
        switch (status) {
            case DISABLED:
                buf.append("<a href=\"" + uri + "?" + getNonce() + "&Cmd=ENABLE-APP&Range=CONTEXT&");
                contextString(buf, path, alias, jvmRoute);
                buf.append("\">Enable</a> ");
                break;
            case ENABLED:
                buf.append("<a href=\"" + uri + "?" + getNonce() + "&Cmd=DISABLE-APP&Range=CONTEXT&");
                contextString(buf, path, alias, jvmRoute);
                buf.append("\">Disable</a> ");
                break;
        }
    }
1372089
function CommandArgLength(cmd) {
  this.name = CommandArgLength.name;
  if(arguments.length > 1) {
    cmd = slice.call(arguments, 0).join(' ');
  }
  StoreError.apply(
    this, [null, 'wrong number of arguments for \'%s\' command', cmd]);
}
519291
function parseCommandLine() {
	var commands = process.argv.slice(2);
	var args = {};

	for (var i = 0; i < commands.length; i++) {
		var match = commands[i].match(/^--(.+)=(.+)$/);
		if (match)
			args[match[1]] = match[2];
		else if (i < commands.length - 1 && commands[i].substr(0, 1) === "-") {
			args[commands[i].substr(1)] = commands[i + 1];
			i++;
		}
		else if (i === 0) args[commandKey] = commands[i];
		else if (i === 1) args[commandHost] = commands[i];
	}

	return args;
}