9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] grep bug?
Date: Fri, 12 Jul 2013 06:39:26 +0900	[thread overview]
Message-ID: <037DE2C5-A225-4741-A3F1-AA7BC24C0B80@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <24ccd68343090eaea81aabf6e539c2b1@coraid.com>

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% 

Kenji Arisawa




  reply	other threads:[~2013-07-11 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 13:11 arisawa
2013-07-11 14:05 ` erik quanstrom
2013-07-11 21:39   ` arisawa [this message]
2013-07-21  3:29     ` [9fans] grep bug again arisawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=037DE2C5-A225-4741-A3F1-AA7BC24C0B80@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).