るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.039秒)
トップページ > バージョン:2.3.0[x] > クエリ:string[x] > クエリ:system[x] > クエリ:to_a[x] > クラス:Shell::Filter[x]

別のキーワード

  1. kernel system
  2. _builtin system
  3. socket af_system
  4. socket pf_system
  5. socket eai_system

ライブラリ

検索結果

Shell::Filter#to_a -> [String] (54646.0)

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

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

require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
puts sh.cat("/etc/passwd").to_a

Shell::Filter#echo(*strings) -> Shell::Filter (340.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...