78件ヒット
[1-78件を表示]
(0.023秒)
種類
- 特異メソッド (36)
- インスタンスメソッド (18)
- 文書 (12)
- 定数 (12)
ライブラリ
- csv (36)
- etc (12)
-
shell
/ filter (18)
クラス
- CSV (36)
-
Shell
:: Filter (18)
モジュール
- Etc (12)
キーワード
- > (6)
- >> (6)
-
SC
_ TIMEOUTS (12) -
ruby 1
. 6 feature (12)
検索結果
先頭5件
-
Shell
:: Filter # out(dev = STDOUT , &block) -> () (21213.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...ェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
}... -
CSV
. filter(input , output , options = Hash . new) {|row| . . . } (18233.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
...後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param......ます。
":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。
//emlist[例: input, output は初期値][ruby]{
# $......: true, return_headers: true, write_headers: true }
CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end
# => header1,header2,header3
# row1_1,row1_2,row1_3
//}
//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS... -
CSV
. filter(input , options = Hash . new) {|row| . . . } (18133.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
...後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param......ます。
":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。
//emlist[例: input, output は初期値][ruby]{
# $......: true, return_headers: true, write_headers: true }
CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end
# => header1,header2,header3
# row1_1,row1_2,row1_3
//}
//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS... -
CSV
. filter(options = Hash . new) {|row| . . . } (18133.0) -
このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。
...後に行を全て output に書き込
みます。
@param input String か IO のインスタンスを指定します。
デフォルトは ARGF です。
@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。
@param......ます。
":out_", ":output_" で始まるキーは output にだけ適用されます。
それ以外のキーは両方に適用されます。
":output_row_sep" のデフォルト値は $/ です。
//emlist[例: input, output は初期値][ruby]{
# $......: true, return_headers: true, write_headers: true }
CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end
# => header1,header2,header3
# row1_1,row1_2,row1_3
//}
//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS... -
Etc
:: SC _ TIMEOUTS -> Integer (3101.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
Shell
:: Filter # >(to) -> self (3012.0) -
toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。
...ルに,IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/etc/passwd") > "tail.out" # と同じ.
}... -
Shell
:: Filter # >>(to) -> self (3012.0) -
toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば それをそのまま出力とする。
...IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") >> "tail.out"
#(sh.tail("-n 3") < "/etc/passwd") >> File.open("tail.out", "w") # でも同じ。
}... -
ruby 1
. 6 feature (18.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...を返していた
p "foo".slice!(5,10)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil
: 2002-07-05 String#......たリゾルバは、timeout の制御が効きます(つまり、名前解
決中にThreadが切替え可能ということです)
require 'resolv'
p Resolv.new.getaddress("www.ruby-lang.org").to_s
=> /usr/local/lib/ruby/1.6/resolv.rb:160: warning: timeout (...) interpreted as metho......SO_SECURITY_AUTHENTICATION
SO_SECURITY_ENCRYPTION_TRANSPORT
SO_SECURITY_ENCRYPTION_NETWORK
SO_BINDTODEVICE
SO_ATTACH_FILTER
SO_DETACH_FILTER
SO_PEERNAME
SO_TIMESTAMP
: ((<require|組み込み関数>)) / $LOAD_PATH
Changed to use a new algorithm to locate a library...