るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Open3.#pipeline_r(*cmds) -> [IO, [Thread]] (12333.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...します。

例:

r
equire "open3"

Open3
.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}

@see Open3.#popen3...

Open3.#pipeline_r(*cmds) {|last_stdout, wait_thrs| ... } -> () (12333.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...します。

例:

r
equire "open3"

Open3
.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}

@see Open3.#popen3...

Open3.#pipeline_rw(*cmds) -> [IO, IO, [Thread]] (12313.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...返します。

例:

r
equire "open3"

Open3
.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs|
stdin.puts "foo"
stdin.puts "bar"
stdin.puts "baz"

# sortコマンドにEOFを送る。
stdin.close

# stdinに渡した文字列をsortコマンドが並べ...

Open3.#pipeline_rw(*cmds) {|first_stdin, last_stdout, wait_thrs| ... } -> () (12313.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...返します。

例:

r
equire "open3"

Open3
.pipeline_rw("sort", "cat -n") {|stdin, stdout, wait_thrs|
stdin.puts "foo"
stdin.puts "bar"
stdin.puts "baz"

# sortコマンドにEOFを送る。
stdin.close

# stdinに渡した文字列をsortコマンドが並べ...

Open3.#pipeline_start(*cmds) -> [Thread] (12307.0)

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

...行します。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...rgv0], arg1, ..., options]

@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロックを指定しなかった場合は実行したプロセスを待つためのスレッ
ドの配列を返します。

例:

r
equire "open3...

絞り込み条件を変える

Open3.#pipeline_start(*cmds) {|wait_thrs| ... } -> () (12307.0)

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

...行します。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...rgv0], arg1, ..., options]

@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロックを指定しなかった場合は実行したプロセスを待つためのスレッ
ドの配列を返します。

例:

r
equire "open3...

Open3.#pipeline_w(*cmds) {|first_stdin, wait_thrs| ... } -> () (6413.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事ができます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...た場合は最初に実行するコマンドの標準入力、
実行したプロセスを待つためのスレッドの配列を配列で返します。

例:

r
equire "open3"

Open3
.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|w, ts|
w.puts "hello"
}

@see Open3.#popen3...

Open3.#capture3(*cmd) -> [String, String, Process::Status] (6401.0)

cmdで指定されたコマンドを実行し、そのプロセスの標準出力と標準エラー、プ ロセスの終了ステータスを表すオブジェクトを返します。

...す。

@param cmd 実行するコマンドを指定します。

@return 実行したコマンドの標準出力と標準エラー、プロセスの終了ステータ
スを表すオブジェクトを配列で返します。

指定された引数はopts[:stdin_data]とopts[:binmode]以外...
....#popen3に渡されます。opts[:stdin_data]は実行するコマンドの
標準入力に渡されます。opts[:binmode]を真に指定されると内部で使用される
パイプをバイナリモードに指定します。

例:

r
equire "open3"

o, e, s = Open3.capture3("echo a; sort...
...>&2", :stdin_data=>"foo\nbar\nbaz\n")
p o #=> "a\n"
p e #=> "bar\nbaz\nfoo\n"
p s #=> #<Process::Status: pid 32682 exit 0>

Open3
.#popen3と同様に引数に環境変数とオプションを指定してコマンド
を実行する事ができます。

@see Open3.#popen3...

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

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

...行します。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
..., commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]

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

例1:

r
equire "open3"

fname = "/usr/share/man/man1/ruby.1.gz"
p Open3.pipeline(["zcat...

Open3.#pipeline_w(*cmds) -> [IO, [Thread]] (6313.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事ができます。

...できます。

@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま...
...options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]...
...た場合は最初に実行するコマンドの標準入力、
実行したプロセスを待つためのスレッドの配列を配列で返します。

例:

r
equire "open3"

Open3
.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|w, ts|
w.puts "hello"
}

@see Open3.#popen3...

絞り込み条件を変える

<< 1 2 > >>