別のキーワード
種類
- 変数 (48)
- 特異メソッド (24)
- インスタンスメソッド (18)
ライブラリ
- English (48)
- csv (12)
- shell (24)
-
shell
/ filter (6)
クラス
- CSV (12)
- Shell (24)
-
Shell
:: Filter (6)
モジュール
- Kernel (48)
キーワード
-
$ INPUT _ RECORD _ SEPARATOR (12) -
$ ORS (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
$ RS (12) -
default
_ record _ separator (6) -
default
_ record _ separator= (6) - each (6)
- new (12)
-
record
_ separator= (6)
検索結果
先頭5件
-
Shell
# record _ separator -> String (18101.0) -
@todo
@todo -
Kernel
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (6107.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
Shell
. default _ record _ separator -> String (6102.0) -
執筆者募集
執筆者募集
Shell で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。
@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定します。 -
Shell
. default _ record _ separator=(rs) (6102.0) -
執筆者募集
執筆者募集
Shell で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。
@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定します。 -
Shell
# record _ separator=(rs) (6101.0) -
@todo
@todo -
Kernel
$ $ OUTPUT _ RECORD _ SEPARATOR -> String | nil (3107.0) -
$\ の別名
...$\ の別名
require "English"
print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb
ruby sample.rb
hoge
huga
fuge
ugo... -
Kernel
$ $ RS -> String | nil (3007.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
Kernel
$ $ ORS -> String | nil (7.0) -
$\ の別名
...$\ の別名
require "English"
print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb
ruby sample.rb
hoge
huga
fuge
ugo... -
CSV
. new(data , options = Hash . new) -> CSV (6.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object::STDERR, or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be open... -
Shell
:: Filter # each(rs = nil) -> () (6.0) -
フィルタの一行ずつをblockに渡します。
...行ずつをblockに渡します。
@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。
使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts line
}...