るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.137秒)
トップページ > クエリ:I[x] > クエリ:Require[x] > クエリ:r[x] > クラス:Shell::CommandProcessor[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. _builtin i
  5. matrix i

ライブラリ

キーワード

検索結果

Shell::CommandProcessor#mkdir(*path) -> Array (12207.0)

Dir.mkdirと同じです。 (複数可)

...Dir.mkdirと同じです。 (複数可)

@param path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require
'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>...
...["foo"]
r
escue => err
puts err
end...

Shell::CommandProcessor#foreach(path = nil, &block) -> () (6207.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...ファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require
'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|...

Shell::CommandProcessor#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (3507.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param...
...file1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require
'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
r
escue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"]...
...# => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (3507.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param...
...file1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require
'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
r
escue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"]...
...# => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#cat(*files) -> Shell::Filter (3307.0)

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

...する 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) | tee(file + ".tee") >> "all.tee"
}
}
}...

絞り込み条件を変える

Shell::CommandProcessor#tee(file) -> Shell::Filter (3307.0)

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

...する Filter オブジェクトを返します.

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
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::CommandProcessor#echo(*strings) -> Shell::Filter (3207.0)

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

...ilter オブジェクトを返します.

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

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

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (3207.0)

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

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

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。

動作例
require
'shell'
Shell.def_system_c...
...ommand("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"
}
}
}

@see Dir.[]...