[#26295] tail -f のように読み続ける方法は? — Kazuhiro NISHIYAMA <zn@...>

tail -fのようにだんだん大きくなるファイルを読み込み続けるのは

22 messages 2000/12/03
[#26301] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/03

まつもと ゆきひろです

[#26303] Re: tail -f のように読み続ける方法は? — WATANABE Tetsuya <tetsu@...> 2000/12/04

渡辺哲也です。

[#26323] Re: tail -f のように読み続ける方法は? — Kazuhiro NISHIYAMA <zn@...> 2000/12/04

On Mon, 4 Dec 2000 10:18:47 +0900

[#26324] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/04

まつもと ゆきひろです

[#26331] Re: tail -f のように読み続ける方法は? — nobu.nakada@... 2000/12/04

なかだです。

[#26346] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/05

まつもと ゆきひろです

[#26362] Re: tail -f のように読み続ける方法は? — とみたまさひろ <tommy@...> 2000/12/05

とみたです。

[#26368] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/06

まつもと ゆきひろです

[#26313] 並行するスレッドの記述法について — Kenya OGATA <ind.onosetu1@...>

おがたといいます。

30 messages 2000/12/04
[#26332] Re: 並行するスレッドの記述法について — nobu.nakada@... 2000/12/04

なかだです。

[#26335] Re: 並行するスレッドの記述法について — Kenya Ogata <k_ogata@...> 2000/12/04

おがたです。なかださんコメントありがとうございます。

[#26337] Re: 並行するスレッドの記述法について — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/12/05

なかだです。

[#26338] ruby-GD — Akira Muraki <a-muraki@...> 2000/12/05

村木@日立ITです。

[#26354] Re: ruby-GD — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/12/05

なかだです。

[#26355] Re: ruby-GD — Akira Muraki <a-muraki@...> 2000/12/05

村木です

[#26356] Re: ruby-GD — "U.Nakamura" <usa@...> 2000/12/05

こんにちは、なかむら(う)です。

[#26415] cgi.rb で InsecureOperation — Takeshi Komiya <katsuwo@...>

25 messages 2000/12/07

[#26536] ファイル名が文字化け — KUROSAWA Takashi <tabby@...>

Tabby as くろさわ@秩父です。

21 messages 2000/12/14
[#26537] Re: ファイル名が文字化け — WATANABE Hirofumi <eban@...> 2000/12/15

わたなべです.

[#26554] Hash.new — Takao KAWAMURA <kawamura@...>

Hash.newの挙動について、理解できないことがありましたので、教

47 messages 2000/12/16
[#26555] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

ごとけんです

[#26559] Re: Hash.new — nobu.nakada@... 2000/12/16

なかだです。

[#26561] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26559] Re: Hash.new"

[#26564] Re: Hash.new — matz@... (Yukihiro Matsumoto) 2000/12/16

まつもと ゆきひろです

[#26565] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26564] Re: Hash.new"

[#26566] Re: Hash.new — Yasushi Shoji <yashi@...> 2000/12/16

At Sun, 17 Dec 2000 02:23:14 +0900,

[#26567] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26566] Re: Hash.new"

[#26569] Re: Hash.new — Yasushi Shoji <yashi@...> 2000/12/16

At Sun, 17 Dec 2000 03:28:55 +0900,

[#26576] Re: Hash.new — matz@... (Yukihiro Matsumoto) 2000/12/17

まつもと ゆきひろです

[#26605] [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp>

石橋秀仁です。

28 messages 2000/12/18
[#26642] Re: [Q] Oracle PL/SQL with bind vars — Yoshida Masato <yoshidam@...> 2000/12/19

よしだです

[#26656] Re: [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/20

石橋秀仁です。よしださん、リプライありがとうございます。

[#26696] Re: [Q] Oracle PL/SQL with bind vars — Yoshida Masato <yoshidam@...> 2000/12/21

よしだです

[#26701] Re: [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/21

石橋秀仁です。こんばんは。

[#26703] 一行野郎と Ruby について (Re: [Q] Oracle PL/SQL with bind vars) — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/21

石橋秀仁です。こんばんは。

[#26609] net/http,smtp,pop 1.2 pre 1 — Minero Aoki <aamine@...>

あおきです。

24 messages 2000/12/18
[#26653] Re: net/http,smtp,pop 1.2 pre 1 — TAKAHASHI Masayoshi <maki@...> 2000/12/20

高橋征義です。

[#26658] cgi.rb and Regexp::last_match — OHSHIMA Ryunosuke <ryu@...>

大島です。

53 messages 2000/12/20
[#26666] Re: cgi.rb and Regexp::last_match — Wakou Aoyama <wakou@...> 2000/12/20

青山です。

[#26668] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/21

まつもと ゆきひろです

[#26711] Re: cgi.rb and Regexp::last_match — Wakou Aoyama <wakou@...> 2000/12/21

青山です。

[#26713] Re: cgi.rb and Regexp::last_match — Shin-ichiro Hara <sinara@...> 2000/12/22

原です。

[#26716] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/22

まつもと ゆきひろです

[#26721] Re: cgi.rb and Regexp::last_match — ARIMA Yasuhiro <fit0298@...> 2000/12/22

有馬です。

[#26722] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/22

まつもと ゆきひろです

[#26791] Re: cgi.rb and Regexp::last_match — "Akinori MUSHA" <knu@...> 2000/12/24

At Fri, 22 Dec 2000 15:03:17 +0900,

[#26811] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/24

まつもと ゆきひろです

[#26670] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...>

さっきruby-listに入ったばかりなので、

27 messages 2000/12/21
[#26672] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/21

まつもと ゆきひろです

[#26675] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> まつもと ゆきひろです

[#26677] Re: cgi.rb and Regexp::last_match — Shugo Maeda <shugo@...> 2000/12/21

前田です。

[#26678] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> 前田です。

[#26679] Re: cgi.rb and Regexp::last_match — Shugo Maeda <shugo@...> 2000/12/21

前田です。

[#26683] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> 前田です。

[#26725] ruby 1.6.2-preview4 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

34 messages 2000/12/22

[#26735] gpib-rb — kiwamu <kiwamu@...>

こんにちは。岡部と申します。

17 messages 2000/12/22

[#26846] Ruby 1.6.2 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

16 messages 2000/12/25

[ruby-list:26432] File.open のブロック中で exec

From: OZAWA -Crouton- Sakuro <crouton@...>
Date: 2000-12-08 05:57:47 UTC
List: ruby-list #26432
さくです。

IRCでもちょっとお尋ねしましたが、open do ... end の中でexecを行ったとき、
openされているファイルはどうなるのでしょうか?

$ cat openit.c
#include <fcntl.h>
#include <stdio.h>

int main()
{
    int fd;
    fd = open("test", O_CREAT);
    printf("%d\n", fd);
    close(fd);
    unlink("test");
    return 0;
}
$ cat execit.rb
#!/usr/bin/ruby

open('/dev/null') do |file|
  exec('./openit');
end
$ ruby execit.rb
4
$ 
となりました。他にファイルを開いていなければ、閉じているなら3になるはずな
ので、閉じないままになると判断したのですが。

実際にやってるのは、自分の ~/.shosts を読んで、条件にマッチするエントリが
あったら、sshをexecする以下のようなスクリプトです。
# sshにホスト名でリンク張るだけだと名前が違うときに困るので。

#!/usr/bin/ruby

SHOSTS = File.join(ENV['HOME'], '.shosts')

$0 = File.basename($0)
open(SHOSTS) do |shosts|
  while shosts.gets
    h, u = $_.chomp.split(/ /)
    exec "ssh -l #{u} #{h} #{ARGV.join(' ')}" if h =~ $0
  end
end
# エラー処理省略

-- 
OZAWA -Crouton- Sakuro
E-Mail: mailto:crouton@weatherlight.org
   Web: http://www.weatherlight.org/~crouton/
   PGP: C98F 74E0 AEEB 4578 1DFC  F650 3BE0 9627 11FC C9F5
VERBA VOLANT, SCRIPTA MANENT

In This Thread

Prev Next