- pipeline_w(*cmds) -> [IO, [Thread]][permalink][rdoc][edit]
- pipeline_w(*cmds) {|first_stdin, wait_thrs| ... } -> ()
- 
指定したコマンドのリストをパイプで繋いで順番に実行します。最初のコマンドの標準入力に書き込む事ができます。 - [PARAM] cmds:
- 実行するコマンドのリストを指定します。それぞれのコマンドは以下のように String か Array で指定します。 commandline にはコマンド全体(例. "nroff -man")を表す String を指定します。 options には Hash で指定します。 env には環境変数を Hash で指定します。 cmdname にはコマンド名を表す String を指定します。 1、2、3 は shell 経由で実行されます。
 - commandline
- [commandline, options]
- [env, commandline, options]
- [env, cmdname, arg1, arg2, ..., options]
- [env, [cmdname, argv0], arg1, ..., options]
 - [RETURN]
- ブロックを指定した場合はブロックの最後に評価された値を返します。ブロックを指定しなかった場合は最初に実行するコマンドの標準入力、実行したプロセスを待つためのスレッドの配列を配列で返します。
 例: require "open3" Open3.pipeline_w("bzip2 -c", :out=>"/tmp/hello.bz2") {|w, ts| w.puts "hello" }[SEE_ALSO] Open3.#popen3