buggrep - Bugs: bug #25805, fgrep or "grep -F" ...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25805: fgrep or "grep -F" fails to match patterns on Windows/DOS

Submitted by:  Harold Bamford <hbamford>
Submitted on:  Tue 10 Mar 2009 12:57:06 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 04 Dec 2009 12:54:31 PM UTC, comment #2:

Thank you for the bug report. This bug has been fixed in the
development sources, which can be downloaded using git from
git://git.sv.gnu.org/grep.git

Paolo Bonzini <bonzini>
Tue 10 Mar 2009 01:00:57 AM UTC, comment #1:

I attached my modified file since the verbatim comment seems to have wrapped the code to something almost unreadable.

Sorry about that.

Harold Bamford <hbamford>
Tue 10 Mar 2009 12:57:06 AM UTC, original submission:

On a Windows/DOS box, the newline is actually \r\n rather than the normal Unix \n. The function Fcompile() (in src/search.c around line 500) doesn't account for this and so the \r is treated as part of the pattern. This is almost never what was intended. I checked the latest version, 2.5.4

As a temporary kludgey patch, I have this alternate version of that function:

Harold Bamford <hbamford>

 

Attached Files
file #17633:  search.c added by hbamford (21KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  • -unavailable- added by hbamford (Submitted the item)
  • -unavailable- added by hbamford
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 04 Dec 2009 12:54:31 PM UTCbonziniOpen/ClosedOpen=>Closed
    Tue 10 Mar 2009 12:59:30 AM UTChbamfordAttached File-=>Added search.c, #17633
    Tue 10 Mar 2009 12:57:06 AM UTChbamfordCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1