22件ヒット
[1-22件を表示]
(0.153秒)
検索結果
先頭2件
-
Open3
. # pipeline _ rw(*cmds) -> [IO , IO , [Thread]] (24332.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。
...できます。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま......す。
options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [command......返します。
例:
require "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| . . . } -> () (24332.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最初の コマンドの標準入力に書き込む事も最後のコマンドの標準出力を受けとる事も できます。
...できます。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定しま......す。
options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [command......返します。
例:
require "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コマンドが並べ...