るりまサーチ

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file chown
  4. file chmod
  5. file path

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

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

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

...ェルコマンド 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") >> "all....

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

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

...ェルコマンド 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") >> "all....

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

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

...ェルコマンド 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") >> "all....

ARGF.class#file -> IO (6154.0)

現在開いている処理対象の File オブジェクト(または IO オブジェ クト)を返します。

...開いている処理対象の File オブジェクト(または IO オブジェ
クト)を返します。

$ echo "foo" > foo
$ echo "bar" > bar

$ ruby argf.rb foo bar

ARGF.file # => #<File:foo>
ARGF.read(5) # => "foo\nb"
ARGF.file # => #<File:bar>

ARGFが現在開いて...

ARGF.class#filename -> String (6119.0)

現在開いている処理対象のファイル名を返します。

...は - を返します。
組み込み変数 $FILENAME と同じです。

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

ARGF.filename # => "foo"
ARGF.read(5) # => "foo\nb"
ARGF.filename # => "bar"
ARGF.skip
ARGF.filename # => "glark"...

絞り込み条件を変える

ARGF.class#path -> String (3019.0)

現在開いている処理対象のファイル名を返します。

...は - を返します。
組み込み変数 $FILENAME と同じです。

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

ARGF.filename # => "foo"
ARGF.read(5) # => "foo\nb"
ARGF.filename # => "bar"
ARGF.skip
ARGF.filename # => "glark"...

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...

Shell::CommandProcessor#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...

Shell::Filter#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...

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

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

...m files シェルコマンド cat に与えるファイル名を文字列で指定します。

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

絞り込み条件を変える

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

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

...m files シェルコマンド cat に与えるファイル名を文字列で指定します。

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

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

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

...m files シェルコマンド cat に与えるファイル名を文字列で指定します。

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

ARGF.class#getbyte -> Integer | nil (37.0)

self から 1 バイト(0..255)を読み込み整数として返します。 既に EOF に達していれば nil を返します。

...のため、最初のファイルを最後まで読んだ後は次のファイルの内
容を返します。

$ echo "foo" > file1
$ echo "bar" > file2
$ ruby argf.rb file1 file2

ARGF.getbyte # => 102
ARGF.getbyte # => 111
ARGF.getbyte # => 111
ARGF.getbyte # => 10
ARGF.getbyte # =...

ARGF.class#getc -> String | nil (37.0)

self から 1 文字読み込んで返します。EOF に到達した時には nil を返します。

...のため、最初のファイルを最後まで読んだ後は次のファイルの内
容を返します。

$ echo "foo" > file1
$ echo "bar" > file2
$ ruby argf.rb file1 file2

ARGF.getc # => "f"
ARGF.getc # => "o"
ARGF.getc # => "o"
ARGF.getc # => "\n"
ARGF.getc # => "b"
ARGF....
<< 1 2 > >>