るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.119秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:p[x] > クエリ:require[x] > クラス:Shell::Filter[x]

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. rsa p

ライブラリ

キーワード

検索結果

Shell::Filter#mkdir(*path) -> Array (114.0)

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

...可)

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

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

使用例
require
'shell'
Shell.verbose = false
sh = Shell.new
begin
p
sh.mkdir("foo") #=> ["foo"]
rescue => err
p
uts er...

Shell::Filter#foreach(path = nil, &block) -> () (108.0)

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

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

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

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

Shell::Filter#glob(pattern) -> Shell::Filter (108.0)

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

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

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、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"
}
}
}

@see Dir.[]...

Shell::Filter#system(command, *opts) -> Shell::SystemCommand (108.0)

command を実行する.

...command を実行する.

@param command 実行するコマンドのパスを文字列で指定します。

@param opts command のオプションを文字列で指定します。複数可。

使用例:

require
'shell'
Shell.verbose = false
sh = Shell.new

p
rint sh.system("ls", "-l")
S...

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

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

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

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

@para...
...スを指定します。

require
'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
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"] #...

絞り込み条件を変える

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

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

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

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

@para...
...スを指定します。

require
'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
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"] #...