るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Shell#echo(*strings) -> Shell::Filter (18137.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 (18137.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 (18137.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 (6153.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 (6118.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 (3018.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"...

ruby 1.6 feature (192.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ったため、enq などを
呼び出したときスーパークラス Queue の enq が実行されていました。

: 2002-09-11: ((<tempfile/Tempfile#size>))

追加 ((<ruby-dev:17221>))

: 2002-09-09

mswin32 版と mingw32 版の ruby で、1.6.6の頃から ruby の子プロセスに...
...by-dev:18145>))

: 2002-08-20 File.expand_path

Cygwin 1.3.x ((<ruby-bugs-ja:PR#299>))

p File.expand_path('file', 'c:/')

=> ruby 1.6.7 (2002-03-01) [i586-linux]
/tmp/c:/file
=> ruby 1.6.7 (2002-08-21) [i586-linux]
c:/file

: 2002-08-19 Thread (win)...
...した。((<ruby-dev:13756>))

$ echo p __FILE__ > ~/a.rb
$ ruby17 -v -r~/a -e0
ruby 1.7.1 (2001-07-03) [i686-linux]
0: No such file to load -- ~/a (LoadError)
$ ruby16 -v -r~/a -e0
ruby 1.6.4 (2001-07-02) [i686-linux]
0: No such file to load -- ~/a (LoadError)
$ ruby...

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

Kernel.#spawn(env, program, *args, options={}) -> Integer (66.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...* リダイレクト先のファイル名文字列
* [リダイレクト先のファイル名文字列]、配列の要素にすることで
File
::Constants::RDONLY でファイルを開いてリダイレクトします。
* [リダイレクト先のファイル名文字列, モード文...
...タ1
* :err 標準エラー出力, ファイルデスクリプタ2
* 整数 指定した整数が表すファイルデスクリプタ
* IO IO#fileno で表されるファイルデスクリプタ

=== option引数の詳細および例

「:unsetenv_others」を使うと、envで指定したも...
...IO.popen で、子プロセスの
stderr と stdout を混ぜる例を以下に示します。
//emlist[][ruby]{
io = IO.popen(["sh", "-c", "echo out; echo err >&2", :err=>[:child, :out]])
p io.read #=> "out\nerr\n
//}

spawn と IO.popen では
デフォルトでは非標準的なファイルデス...
<< 1 2 3 > >>