201件ヒット
[1-100件を表示]
(0.050秒)
種類
- インスタンスメソッド (151)
- 定数 (22)
- 文書 (22)
- ライブラリ (6)
ライブラリ
- ビルトイン (18)
- logger (1)
-
rubygems
/ specification (22) - shell (36)
-
shell
/ command-processor (36) -
shell
/ filter (60)
クラス
-
Gem
:: Specification (22) - Hash (18)
-
Logger
:: Application (1) - Shell (36)
-
Shell
:: CommandProcessor (36) -
Shell
:: Filter (60)
検索結果
先頭5件
-
Shell
# cat(*files) -> Shell :: Filter (21325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
....
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
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) |... -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (21325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
....
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
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) |... -
Shell
:: Filter # cat(*files) -> Shell :: Filter (21325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
....
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
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) |... -
Shell
# concat(*jobs) -> Shell :: Concat (9400.0) -
@todo
@todo -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (9400.0) -
@todo
@todo -
Shell
:: Filter # concat(*jobs) -> Shell :: Concat (9400.0) -
@todo
@todo -
Gem
:: Specification :: MARSHAL _ FIELDS -> Hash (9300.0) -
@todo
@todo -
Gem
:: Specification :: SPECIFICATION _ VERSION _ HISTORY -> Hash (9300.0) -
gemspec ファイルのバージョンの歴史を表す定数です。
gemspec ファイルのバージョンの歴史を表す定数です。 -
Shell
# truncate(path , length) -> 0 (9200.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate... -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (9200.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate... -
Shell
:: Filter # truncate(path , length) -> 0 (9200.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate... -
shell (6256.0)
-
Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
...で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
sh/csh の制御文は Ruby の機能を用いて実現します。
=== サンプル
==== Example 1:
require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unle......shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
f.puts "TEST"
f.close
end
print sh.pwd
end
end
==== Example 2:
require 'shell'
sh......uire 'shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"
==== Example 4:
require 'shell'
sh = Shell.n... -
Logger
:: Application # set _ log(logdev , shift _ age = 0 , shift _ size = 1024000) -> Integer (3300.0) -
内部で使用する Logger のオブジェクトを初期化します。
...化します。
@param logdev ログを書き込むファイル名か、 IO オブジェクト(STDOUT, STDERR など)を指定します。
@param shift_age ログファイルを保持する数か、ログファイルを切り替える頻度を指定します。
頻度には daily,......ly を文字列で指定することができます。
省略すると、ログの保存先を切り替えません。
@param shift_size shift_age を整数で指定した場合のみ有効です。
このサイズでログファイルを切り替えます。
@re... -
Shell
# echo(*strings) -> Shell :: Filter (3218.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...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") >> "all.tee"
}
}... -
Shell
# glob(pattern) -> Shell :: Filter (3218.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...式については、Dir.[] を参照してください。
動作例
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") >> "all.tee"
}... -
Shell
# tee(file) -> Shell :: Filter (3218.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...与えるファイル名を文字列で指定します。
動作例
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") >> "all.tee"
}
}...