12件ヒット
[1-12件を表示]
(0.122秒)
別のキーワード
ライブラリ
-
shell
/ filter (12)
検索結果
先頭2件
-
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18321.0) -
command を実行する.
...る.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_comma......nd("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: Filter # glob(pattern) -> Shell :: Filter (108.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...オブジェクトを返します.
@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
s......h.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]...