るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.021秒)
トップページ > クエリ:IO[x] > バージョン:2.1.0[x] > ライブラリ:shell[x] > クエリ:>>[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

クラス

検索結果

Shell::Filter#>>(to) -> self (54406.0)

toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば それをそのまま出力とする。

...す。文字列ならばファイルに、IOオブジェクトならばそれに出力します。

使用例
require 'shell'
Shell
.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") >> "tail.out"
#(sh.tail("-n 3") < "/etc/passwd") >> File.open...