[#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:26240] Re: String#sub! on RAA: auto bookmark ????

From: Tokita Kousui <ktokita@...>
Date: 2000-12-01 03:03:00 UTC
List: ruby-list #26240
ども、時田です。


Fri, Dec 01, 2000 at 09:51:42AM +0900 において
Yukihiro Matsumoto さん曰く:

> まつもと ゆきひろです
> 
> In message "[ruby-list:26232] String#sub!  on RAA: auto bookmark ????"
>     on 00/11/30, Tokita Kousui <ktokita@where-i.net> writes:
> 
> |例の、String#concat で追加が出来なくなったから String#<< を使うようにする
> |のはわかったんですが
> 
> String#concatで追加できないってなんでしたっけ?
> Array#concatで非配列要素の追加ができなくなったってのはありま
> したが。

すいません、間違いでした
Array#concat での話でした。


> |bkmksubrt.rb の中の print_dir_selection って関数で
> |i.sub!( /^#{d}/, "" )
> |の結果、 変数 d がクリアされてしまいます
> |これの理由が良くわかりません
> 
> 私にも分かりません。再現するスクリプトが用意できますか?

原因がわからないので、再現する最小構成は用意できません すいません
最小構成を作ろうとして、うまく動いてしまったので
それはスレッド先頭の記事に書きました

RAA の WWW の所に登録されている[た] 「ringo's auto bookmark」の旧版 0.32
autobkmk-0.32.tar.gz での話ですが

Linux version 2.2.12-32 (古くてすいません レンタルサーバなので たしか LASER) で
ruby 1.6.1 と、0.32 autobkmk-0.32.tar.gz で
bkmksubrt.rb に 下記パッチをあてて、適当にデータを作った後に

print_dir_selection 関数にあたった部分のパッチの
i = "#{i}"
をコメントアウトして、ブックマークの適当なエントリを MOVE すると
WWWサーバのエラーログで   C val d:  の所で変数 d が空白文字列になります

変数 d は使い回しているようなので ログの先頭で再現されて
それ以降 変数 d は全て空白文字列になります


なにか、全然はずしてるのだろうか?
作者の修正が concat の部分だけで済んだって事は こっちの環境??? まさか(^^;



パッチはあまり作らないので、付けるべきオプションを入れてないかも知れません
とりあえず、 -c だけは指定しました。

****パッチここから****

*** bkmksubrt.rb	Sun Jan 23 23:03:17 2000
--- ../new/bkmksubrt.rb	Fri Dec  1 11:45:11 2000
***************
*** 124,129 ****
--- 124,130 ----
  	dirs.each { |i|
  		t += "#{i}/"
  		fols.push( get_line_file( "#{dd}/#{t}/info", 0 ) )
+ #		fols << get_line_file( "#{dd}/#{t}/info", 0 )
  	}
  	return fols.join( "/" )
  end
***************
*** 132,147 ****
  
  # d : db directory name
  def print_dir_selection( d )
- 
  	findout = findfunc ( d, "d", true )
  	print findout
  	print "<option selected value=\"/\">/\n"
  	findout.each { |i|
  		i.tr!( "\n", "" )
  		i.sub!( /^#{d}/, "" )
  		next if ( i == "" )
  		next if ( i =~ /_ck/ )
- 		STDERR.print "I: #{i}\n"
  		foln = replace_dir_with_folder_name( i , d )
  		print "<option value=\"#{i}\">#{foln}"
  	}
--- 133,151 ----
  
  # d : db directory name
  def print_dir_selection( d )
  	findout = findfunc ( d, "d", true )
  	print findout
  	print "<option selected value=\"/\">/\n"
  	findout.each { |i|
+ 		STDERR.print "A val d: #{d}\n"
+ 		i = "#{i}"
  		i.tr!( "\n", "" )
+ 		STDERR.print "B val d: #{d}\n"
  		i.sub!( /^#{d}/, "" )
+ 		STDERR.print "C val d: #{d}\n"
+ 
  		next if ( i == "" )
  		next if ( i =~ /_ck/ )
  		foln = replace_dir_with_folder_name( i , d )
  		print "<option value=\"#{i}\">#{foln}"
  	}
***************
*** 195,205 ****
  	if ( recursive == nil )
  		prefix = "#{dir}/"
  		Dir::foreach( dir ) do |f|
! 			allfiles.concat( f )
  		end
  	else
  		Find::find( dir ) do |f|
! 			allfiles.concat( f )
  		end
  	end
  
--- 199,211 ----
  	if ( recursive == nil )
  		prefix = "#{dir}/"
  		Dir::foreach( dir ) do |f|
! #			allfiles.concat( f )
! 			allfiles << f
  		end
  	else
  		Find::find( dir ) do |f|
! #			allfiles.concat( f )
! 			allfiles << f
  		end
  	end
  
***************
*** 208,216 ****
  	allfiles.each do |f|
  		if ( File::ftype( "#{prefix}#{f}" ) == findtype )
  			if ( regexp == nil )
! 				result.concat( f )
  			else
! 				result.concat( f ) if /#{regexp}/ =~ f
  			end
  		end
  	end
--- 214,224 ----
  	allfiles.each do |f|
  		if ( File::ftype( "#{prefix}#{f}" ) == findtype )
  			if ( regexp == nil )
! #				result.concat( f )
! 				result << f
  			else
! #				result.concat( f ) if /#{regexp}/ =~ f
! 				( result << f )  if /#{regexp}/ =~ f
  			end
  		end
  	end


****パッチここまで****

-- 
時田幸粋  <ktokita@where-i.net>
http://ibis.where-i.net/index.htm

In This Thread