Subject: problem with fgrep - only matches if I leave off the last character of the line

From: SZIGETVÁRI János <[email-masked]>
Date: Tue, 2 Aug 2016 14:37:33 +0200

Dear Developer Team,

I have encountered a problem related to fgrep, while I was trying to search
back and forth in a file filled with a number of log messages.
I have managed to narrow down the input file to a few lines, and also wrote
a reproduction guide for it.
I have checked it with a few different grep versions, but not all seemed to
be affected.
Grep 2.6.3 (CentOS 6) and 2.16 (Ubuntu 14.04) were, and 2.25 (Unbuntu
16.04) wasn't.

The problem basically was, that I was fgrepping for messages in syslog-ng
debug logs, and I was looking for matches that matched the log lines, that
were sent to syslog-ng (ie. messages about incoming log messages), and
there were a few messages, where there was no match for the whole message,
but if I removed the last character of the string I was grepping for, then
it did return a match.
The match also showed the character I removed previously, so it was unclear
why there was no match with the last character, and why there was without...

I tried to look for already closed bugs that looked similar, but I did not
manage to find anything similar.

Thanks for your help!

Best Regards,
János Szigetvári

-- 
Janos SZIGETVARI
RHCE, License no. 150-053-692
<https://www.redhat.com/rhtapps/verify/?certId=150-053-692>

E-mail: [email-masked]
Phone: +36209440412 (Hungary)

__@__˚V˚
Make the switch to open (source) applications, protocols, formats now:
- windows -> Linux, iexplore -> Firefox, msoffice -> LibreOffice
- msn -> jabber protocol (Pidgin, Google Talk)
- mp3 -> ogg, wmv -> ogg, jpg -> png, doc/xls/ppt -> odt/ods/odp