るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.029秒)

別のキーワード

  1. shell transact
  2. filter transact
  3. commandprocessor transact
  4. shell/filter transact
  5. shell/command-processor transact

ライブラリ

クラス

検索結果

Shell::Filter#to_s -> String (18119.0)

実行結果を文字列で返します。

...実行結果を文字列で返します。

require 'shell'
Shell.def_system_command("wc")
sh = Shell.new

sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}...

Shell::Filter#|(filter) -> object (36.0)

パイプ結合を filter に対して行います。

...'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
en...