るりまサーチ

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.041秒)
トップページ > クエリ:IO.new[x] > クエリ:>>[x] > クエリ:on_head[x] > クエリ:Stream[x] > クエリ:existing![x] > クラス:Shell[x]

別のキーワード

  1. optionparser on
  2. optparse on
  3. tracer on
  4. _builtin >>
  5. thread abort_on_exception=

ライブラリ

検索結果

Shell#out(dev = STDOUT, &block) -> () (13.0)

Shell#transact を呼び出しその結果を dev に出力します。

...
Shell
#transact を呼び出しその結果を dev に出力します。

@param dev 出力先をIO オブジェクトなどで指定します。

@param block transact 内部で実行するシェルを指定します。


使用例:
require 'shell'
Shell
.def_system_command("head")
sh = Shell...
....new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
}...