Run the command and write the results to the output stream.

 @param parameters [Array] The parameters to pass when making a request
   to run the command.
353746
def run(*parameters)
      resource_name = @link_schema.resource_name
      name = @link_schema.name
      result = @client.send(resource_name).send(name, *parameters)
      result = result.to_a if result.instance_of?(Enumerator)
      if result && !result.instance_of?(String)
        result = MultiJson.dump(result, pretty: true)
      end
      @output.puts(result) unless result.nil?
    end
551861
public static boolean runCommand(final Process p, final OutputStream output) {
        return runCommand(p, output, output, new ArrayList<String>());
    }
118426
private void run(String[] args) {
        if (args.length != 2) {
            usage();
        }
        
        System.out.println("Opening Doradus server: " + args[0] + ":" + args[1]);
        try (DoradusClient client = new DoradusClient(args[0], Integer.parseInt(args[1]))) {
            deleteApplication(client);
            createApplication(client);
            addData(client);
            queryData(client);
            deleteData(client);
        }
    }
1232173
public void write(Parameters parameters) throws IOException {
        if (parameters != null) {
            for (Parameter pv : parameters.getParameterValueMap().values()) {
                if (pv.isAssigned()) {
                    write(pv);
                }
            }
        }
    }
1260515
def process(process)
      parse_files.each do |file|
        begin
          puts file if @options['debug']
          @runner.send(process, file, File.read(file))
        rescue StandardError
          if @options['debug']
            warning = "#{file} looks like it's not a valid Ruby file.  Skipping..."
            plain_output(warning, 'red')
          end
        end
        @bar.increment if display_bar?
      end
      @runner.send("after_#{process}")
    end
494614
def run(command, show=True, *args, **kwargs):
    
    if show:
        print_command(command)
    with hide("running"):
        return _run(command, *args, **kwargs)
695448
public function run($params = null)
    {
        $this->parser = new Parser($this->paths);

        try {
            $argc = ($params === null) ? null : count($params);
            $this->result = $this->parser->parse($argc, $params);
        } catch (\Exception $e) {
            $this->parser->displayError($e->getMessage());
        }

        $this->parse();
    }
1177643
public static function run(String $eventName, Array $parameters = []) : Bool
    {
        return Run::event($eventName, $parameters);
    }
895553
function executeCommand(parameters) {
    if (parameters.colors === undefined) {
      parameters.colors = myrmex.getConfig('colors');
    }
    let config = JSON.stringify(myrmex.getConfig(), null, 2);
    if (parameters.colors) {
      config = icli.highlight(config, { json: true });
    }
    icli.print(config);
  }
31225
def run(program,*arguments)
      program = program.to_s
      arguments = arguments.map { |arg| arg.to_s }

      system(program,*arguments)
    end
1071351
def run(&block)
      if block_given?
        set(:params, &block)
      end

      if post? and multipart?
        put_multipart_params_into_body
      else
        put_params_into_url
      end    
      
      request = RestClient::Request.execute(
         :method => http_method, 
         :url => url, 
         :headers => headers, 
         :payload => body
       )
       self.response = parse_response(request)
    end
781541
def run(args)
      start_time    = Time.now.to_f
      files         = extract_files(args)
      configuration = load_configuration

      configure(configuration, options)

      runner    = Runner.new(configuration)
      output    = runner.analyze(files)
      exec_time = Time.now.to_f - start_time
      status    = 0

      unless output.empty?
        status = 1
        puts output
      end

      show_benchmark_info(exec_time) if options[:benchmark]

      exit(status)
    end
377507
def run(args)
      options = parse_args(args)
      po_file = Extractor.new.extract(options[:path])

      if options[:output_file]
        with_output_file(options[:output_file]) { |f| po_file.write_to(f) }
      else
        po_file.write_to(STDOUT)
      end
    rescue => e
      error(e)
    end
176675
public void runArgs(String[] args) {
        CommandLineParser clParser = new DefaultParser();
        CommandLine line;
        String host;
        String port;
        CMD cmd;
        String[] cmdArgs;
        final PrintStream CONSOLE = System.out;
        try {
            // parse the command line arguments
            line = clParser.parse(options, args);

            if (line.hasOption("output")){
                String location = line.getOptionValue("output");
                File output = new File(location);
                FileOutputStream fos;
                try {
                    fos = new FileOutputStream(output);
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                    throw new ParseException(String.format("Wrong -o option. args %s\n",Arrays.asList(args)));
                }
                PrintStream out = new PrintStream(fos);
                System.setOut(out);

            }
            if (line.getOptions().length==0 || line.hasOption("help")) {
                if ((line.getOptions().length > 2) || (line.getOptions().length==2 && !line.hasOption("output"))){
                    throw new ParseException(String.format("Wrong -help option. args %s\n", Arrays.asList(args)));
                }
                printUsage(System.out);
            }
            if (line.hasOption("server")) {
                String server = line.getOptionValue("server");
                try {
                    host = server.split(":")[0];
                    port = server.split(":")[1];
                }catch (Exception e){
                    throw new ParseException(String.format("Wrong -server option. args %s\n", Arrays.asList(args)));
                }
                ServiceDirectory.getServiceDirectoryConfig().setProperty(
                        DirectoryServiceRestfulClient.SD_API_SD_SERVER_FQDN_PROPERTY,
                        host);
                ServiceDirectory.getServiceDirectoryConfig().setProperty(
                        DirectoryServiceRestfulClient.SD_API_SD_SERVER_PORT_PROPERTY,
                        port);
            }

            if (line.hasOption("exec")) {
                String commandString = line.getOptionValue("exec");
                cmdArgs = parseCommand(commandString);
                try {
                    cmd = CMD.valueOf(cmdArgs[0]);
                } catch (IllegalArgumentException e) {
                    throw new ParseException(String.format("Unknown command [ %s ] \n", commandString));
                }
                if (cmd.sizeOfArgs + 1 != cmdArgs.length) {
                    throw new ParseException(
                            String.format("Wrong arguments number for command %s, required %s but %s \n",
                                    cmdArgs[0], cmd.sizeOfArgs, cmdArgs.length - 1));
                }
                switch (cmd) {
                    case getInstanceOf:
                        lookupInstance(cmdArgs);
                        break;
                    case getAllInstancesOf:
                        lookupInstances(cmdArgs);
                        break;
                    case getAllServices:
                        getAllServices();
                        break;
                    case registerService:
                        registerService(cmdArgs);
                        break;
                    default:
                        fail("command " + cmd + " is unsupported yet");
                        break;
                }

            }
        } catch (ParseException exp) {
            // oops, something went wrong
            exp.printStackTrace();
            try {
                TimeUnit.MILLISECONDS.sleep(100L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            printUsage(System.err);
        }
        System.setOut(CONSOLE);
    }
94969
def process_args
      args = @args.dup
      @options[:operands] = nil
      unless args.length >= 2
        puts @opts
        exit 1
      end
      @options[:operands] = args.shift(2)
      @options[:output_filename] = args.shift unless args.empty?
      @options[:output] ||= @options[:output_filename] || $stdout

      run
    end
1318238
public void run(String... args) throws BadArgs, IOException {
        PrintWriter out = new PrintWriter(System.out);
        try {
            run(out, args);
        } finally {
            out.flush();
        }
    }
414214
def execute(command, params={})
      unless params[:dry_run]
        if params[:return]
          System.execute(command, :return => true)
        else
          $stdout.puts
          System.execute(command)
        end
      end
    end