るりまサーチ

最速Rubyリファレンスマニュアル検索!
198件ヒット [1-100件を表示] (0.085秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file size
  4. file open
  5. file path

モジュール

キーワード

検索結果

<< 1 2 > >>

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

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

...ンド 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::CommandProcessor#glob(pattern) -> Shell::Filter (18138.0)

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

...ンド 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#glob(pattern) -> Shell::Filter (18138.0)

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

...ンド 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::Glob#each(rs = nil) {|file| ... } (3102.0)

@todo

@todo

File::Stat#socket? -> bool (3031.0)

ソケットの時に真を返します。

...ソケットの時に真を返します。

//emlist[][ruby]{
Dir.glob("/tmp/*"){|file|
if File::Stat.new(file).socket?
printf "%s\n", file
end
}
#例
#=> /tmp/uimhelper-hogehoge
#...
//}...

絞り込み条件を変える

File::Stat#blockdev? -> bool (3013.0)

ブロックスペシャルファイルの時に真を返します。

...ブロックスペシャルファイルの時に真を返します。

//emlist[][ruby]{
Dir.glob("/dev/*") {|bd|
if File::Stat.new(bd).blockdev?
puts bd
end
}
#例
#...
#=> /dev/hda1
#=> /dev/hda3
#...
//}...

File::Stat#chardev? -> bool (3013.0)

キャラクタスペシャルファイルの時に真を返します。

...キャラクタスペシャルファイルの時に真を返します。

//emlist[][ruby]{
Dir.glob("/dev/*") {|bd|
if File::Stat.new(bd).chardev?
puts bd
end
}
#例
#...
#=> /dev/tty1
#=> /dev/stderr
#...
//}...

File::Stat#setgid? -> bool (3013.0)

setgidされている時に真を返します。

...setgidされている時に真を返します。

//emlist[][ruby]{
Dir.glob("/usr/sbin/*") {|bd|
if File::Stat.new(bd).setgid?
puts bd
end
}
#例
#...
#=> /usr/sbin/postqueue
#...
//}...

File::Stat#setuid? -> bool (3013.0)

setuidされている時に真を返します。

...setuidされている時に真を返します。

//emlist[][ruby]{
Dir.glob("/bin/*") {|bd|
if File::Stat.new(bd).setuid?
puts bd
end
}
#例
#...
#=> /bin/ping
#=> /bin/su
#...
//}...

File::Stat#sticky? -> bool (3013.0)

stickyビットが立っている時に真を返します。

...stickyビットが立っている時に真を返します。

//emlist[][ruby]{
Dir.glob("/usr/bin/*") {|bd|
begin
if File::Stat.new(bd).sticky?
puts bd
end
rescue
end
}
#例
#...
#=> /usr/bin/emacs-21.4
#...
//}...

絞り込み条件を変える

Shell#tee(file) -> Shell::Filter (138.0)

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

...am 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...
<< 1 2 > >>