[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: found bug
Re: found bug
Mon, 10 Sep 2018 13:40:49 -0600
Karl Riauba wrote:
> I think I found egrep bug.
> No tabs in example file or in variable.
> 10.193.132.65:9102 should suppose to be filtered out, but it doesn't.
I as well tried to reproduce this bug. I was unable to do so. It
works for me okay using grep 3.1.
What version of grep are you using? You can post this using the
Eric suspects you must be using a very old version due to the use of
this mailing list for bug submission. If your version is very old
then it may have been a bug in that older version that was fixed in
the intervening years. It would still be interesting to know here
what version of grep you are using.
> $ echo ===$egrep===
At this point the $egrep variable was not quoted. Oops. Therefore
any amount of whitespace error may have been introduced there that
will be invisible to us.
> === 10.193.132.65:9102 | 10.193.132.65:111 | 10.193.132.65:4560 |
> 10.193.132.65:2800 | 10.193.132.65:4369 | 10.193.132.65:22 |
And then the email was word wrapped which is a very annoying feature
of your mailer. Again it makes it difficult to reproduce bugs
exactly. If you can't convince your mailer not to word wrap then
sometimes these files may be attached verbatim and therefore show the
problem without the mailer causing us problems.
> $ cat egrep_bug
> tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN
Argh! Again the mailer word wrapping this text drives people trying
to reproduce your report crazy! :-(
> tcp 0 0 0.0.0.0:9125 0.0.0.0:* LISTEN
> tcp 0 0 10.193.132.65:9102 10.196.128.42:46852
But here appears to be the main point of your report. The string
10.193.132.65:9102 is in the file and has at least one space both
before and after it. The grep pattern included that same string with
a very likely but unprovable one space both before and after it.
Therefore it should match that line but appears to you to not have
However to me reading this report the most likely cause of the problem
is multiple spaces in the pattern before that address and therefore
not matching due to whitespace problems.
My hopefully helpful advice to you is to quote your variables so that
whitespace is not split by the shell. And then double check very
closely the amount of whitespace in the pattern. If your case is
really a bug in grep then please say the version of grep. And if it
is an older version please try it with a newer version to see if the
problem has been fixed since that older version.
|[Prev in Thread]
||[Next in Thread]|
- Re: found bug,
Bob Proulx <=