るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.073秒)

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rubygems/defaults ruby_engine
  5. rake ruby

ライブラリ

モジュール

検索結果

Open3.#pipeline(*cmds) -> [Process::Status] (18132.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...e, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

@return 実行したコマンドの終了ステータスを配列で返します。

例1:

require "open3"

fname = "/usr/share/man/man1/ruby.1.gz"
p Open3.pipeline(["zcat", fname], "nroff -man", "less")
#=> [#...
...<Process::Status: pid 11817 exit 0>,
# #<Process::Status: pid 11820 exit 0>,
# #<Process::Status: pid 11828 exit 0>]

例2:

require "open3"

Open3.pipeline([{"LANG"=>"C"}, "env"], ["grep", "LANG"], "less")

@see Open3.#popen3...