198件ヒット
[1-100件を表示]
(0.105秒)
ライブラリ
- ビルトイン (72)
- mkmf (24)
- pathname (24)
- shell (24)
-
shell
/ builtin-command (6) -
shell
/ command-processor (24) -
shell
/ filter (24)
クラス
-
File
:: Stat (72) - Pathname (24)
- Shell (24)
-
Shell
:: CommandProcessor (24) -
Shell
:: Filter (24) -
Shell
:: Glob (6)
モジュール
- Kernel (24)
検索結果
先頭5件
-
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...