From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) From: arisawa In-Reply-To: <24ccd68343090eaea81aabf6e539c2b1@coraid.com> Date: Fri, 12 Jul 2013 06:39:26 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <037DE2C5-A225-4741-A3F1-AA7BC24C0B80@ar.aichi-u.ac.jp> References: <18706FFE-E7CD-4A93-B69E-604AC2370B1E@ar.aichi-u.ac.jp> <24ccd68343090eaea81aabf6e539c2b1@coraid.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] grep bug? Topicbox-Message-UUID: 6bc80644-ead8-11e9-9d60-3106f5b1d025 Thanks erik, It is not easy to get small sample. I tried to make smaller sample discarding the first line of pattern file = and target file. the problem depends not only pattern file but also target file! it is curious why grep does not give conclusion to each line that is = read from target file. my result is shown below. t0 and t1 are target file z0 and z1 are pattern file term% echo $t e54272690d513f8b2403568a7574b1ba term% grep -n $t z0 z1 t0 t1 z0:4081: e54272690d513f8b2403568a7574b1ba z1:4082: e54272690d513f8b2403568a7574b1ba t0:4298: e54272690d513f8b2403568a7574b1ba = /usr/arisawa/src/taskfs/Q/task.387.a/ t1:4299: e54272690d513f8b2403568a7574b1ba = /usr/arisawa/src/taskfs/Q/task.387.a/ term% wc z0 z1 t0 t1 4575 4575 150975 z0 4576 4576 151008 z1 4583 9166 388702 t0 4584 9168 388756 t1 18318 27485 1079441 total term% diff -c z0 z1 z0:1,3 - z1:1,4 + 00775d6a004acb79a2cd3ec30f743a9e 008de90ca02f6c4f10e2f172e0511105 00cfd51ea3ea1152f98c1f90130be7d0 00cff9d5f2b4d08753f96564dac50a58 term% diff -c t0 t1 t0:1,3 - t1:1,4 + f104706a82b7c20e0f2c3cf83033958c /usr/arisawa/bin/rc/ 521db7c46291f0785d8d77f8e614350a /usr/arisawa/bin/rc/photo/ e76b64877aea9c8b4dcc24069436d52d /usr/arisawa/lib/ 1d6ca6d83f5f51ebfdd94fea02a9fb8b /usr/arisawa/lib/cookies/ term% grep -f z0 t0 | grep $t e54272690d513f8b2403568a7574b1ba /usr/arisawa/src/taskfs/Q/task.387.a/ term% grep -f z1 t0 | grep $t e54272690d513f8b2403568a7574b1ba /usr/arisawa/src/taskfs/Q/task.387.a/ term% grep -f z0 t1 | grep $t e54272690d513f8b2403568a7574b1ba /usr/arisawa/src/taskfs/Q/task.387.a/ term% grep -f z1 t1 | grep $t term%=20 Kenji Arisawa