るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.088秒)
トップページ > クエリ:I[x] > クエリ:stat[x] > クエリ:pipeline[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. _builtin i

ライブラリ

モジュール

検索結果

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

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

...それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します。
env には環...
...commandline, options]
(4) [env, cmdname, 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...