るりまサーチ

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

別のキーワード

  1. _builtin slice!
  2. string slice!
  3. _builtin select!
  4. _builtin reject!
  5. string gsub!

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Shell#echo(*strings) -> Shell::Filter (18120.0)

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

...ings シェルコマンド echo に与える引数を文字列で指定します。

動作例
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")...

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (18120.0)

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

...ings シェルコマンド echo に与える引数を文字列で指定します。

動作例
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")...

Shell::Filter#echo(*strings) -> Shell::Filter (18120.0)

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

...ings シェルコマンド echo に与える引数を文字列で指定します。

動作例
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")...

Array#pack(template) -> String (73.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...に _ または ! を "s_" あるいは "s!" のように
続けることでシステム依存の short, long のサイズにすることもできます。

i, I (int)のサイズは常にシステム依存であり、n, N, v, V
のサイズは常にシステム依存ではない(!をつけられな...
...造体を渡すときのように、
システム依存のサイズとエンディアンに合わせる必要があるときには
s!, S!, i!, I!, l!, L!, q!, Q!, j!, J! を用います。
また、ネットワークプロトコルやファイルフォーマットのように、
システムに依...
...ディアンを指定したいときは、
リトルエンディアンなら < を、
ビッグエンディアンなら >
を後ろにつけます。! と組み合わせることも可能です。

まとめると以下のようになります。

: エンディアン非依存、整数サイズ非...
...ズ(capacity)が足りなければ、packはメモリを確保します。

//emlist[例][ruby]{
['!'].pack('@1a', buffer: 'abc') # => "a!"
['!'].pack('@5a', buffer: 'abc') # => "abc\u0000\u0000!"
//}

@param template 自身のバイナリとしてパックするためのテンプレートを文...

Array#pack(template, buffer: String.new) -> String (73.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...ズ(capacity)が足りなければ、packはメモリを確保します。

//emlist[例][ruby]{
['!'].pack('@1a', buffer: 'abc') # => "a!"
['!'].pack('@5a', buffer: 'abc') # => "abc\u0000\u0000!"
//}

@param template 自身のバイナリとしてパックするためのテンプレートを文...
...に _ または ! を "s_" あるいは "s!" のように
続けることでシステム依存の short, long のサイズにすることもできます。

i, I (int)のサイズは常にシステム依存であり、n, N, v, V
のサイズは常にシステム依存ではない(!をつけられな...
...造体を渡すときのように、
システム依存のサイズとエンディアンに合わせる必要があるときには
s!, S!, i!, I!, l!, L!, q!, Q!, j!, J! を用います。
また、ネットワークプロトコルやファイルフォーマットのように、
システムに依...

絞り込み条件を変える

String#unpack(template) -> Array (73.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

...に _ または ! を "s_" あるいは "s!" のように
続けることでシステム依存の short, long のサイズにすることもできます。

i, I (int)のサイズは常にシステム依存であり、n, N, v, V
のサイズは常にシステム依存ではない(!をつけられな...
...造体を渡すときのように、
システム依存のサイズとエンディアンに合わせる必要があるときには
s!, S!, i!, I!, l!, L!, q!, Q!, j!, J! を用います。
また、ネットワークプロトコルやファイルフォーマットのように、
システムに依...
...ディアンを指定したいときは、
リトルエンディアンなら < を、
ビッグエンディアンなら >
を後ろにつけます。! と組み合わせることも可能です。

まとめると以下のようになります。

: エンディアン非依存、整数サイズ非...

Shell#cat(*files) -> Shell::Filter (13.0)

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

...ファイル名を文字列で指定します。

動作例
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"
}
}
}...

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

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

...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#tee(file) -> Shell::Filter (13.0)

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

...るファイル名を文字列で指定します。

動作例
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"
}
}
}...

Shell::CommandProcessor#cat(*files) -> Shell::Filter (13.0)

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

...ファイル名を文字列で指定します。

動作例
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"
}
}
}...

絞り込み条件を変える

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (13.0)

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

...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#tee(file) -> Shell::Filter (13.0)

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

...るファイル名を文字列で指定します。

動作例
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"
}
}
}...

Shell::Filter#cat(*files) -> Shell::Filter (13.0)

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

...ファイル名を文字列で指定します。

動作例
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"
}
}
}...

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

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

...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#tee(file) -> Shell::Filter (13.0)

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

...るファイル名を文字列で指定します。

動作例
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"
}
}
}...

絞り込み条件を変える

<< 1 2 > >>