buggrep - Bugs: bug #30895, match across line using grep can...

 
 

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

bug #30895: match across line using grep can be successful only if user unset $LANG

Submitted by:  Zhang Weiwu <zhangweiwu>
Submitted on:  Sat 28 Aug 2010 01:45:43 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 22 Dec 2010 02:36:55 PM UTC, comment #3:

Thanks!

Paolo Bonzini <bonzini>
Wed 22 Dec 2010 02:21:16 PM UTC, comment #2:

I can now verify with 2.6.3 on Ubuntu 10.10 the same procedure that used to be able to reproduce the misbehavior could not reproduce the misbehavior now, thus I see it ok to close the issue.

Zhang Weiwu <zhangweiwu>
Mon 30 Aug 2010 07:50:14 AM UTC, comment #1:

I cannot reproduce this. Your version of grep is likely 2.5.x, because 2.6 was released too close to Ubuntu 10.04. 2.5.x versions of grep were heavily patched by distributions and this sometimes introduced bugs.

Please test with the latest version of grep.

Paolo Bonzini <bonzini>
Sat 28 Aug 2010 01:45:43 AM UTC, original submission:

reproduced on Ubuntu 10.04 LTS:

almustafa@orphalese:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
almustafa@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
almustafa@orphalese:~$ export LANG=
almustafa@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
a
b

In the above case, grep -z 'a.*b' cannot successfully match as it should, but if user unset $LANG, it can.

expected:
In all locales, grep should be able to match across lines using -z. This command should always produce output:
printf 'a\nb\0'| grep -z 'a.*b'

Zhang Weiwu <zhangweiwu>

 

No files currently attached

 

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 zhangweiwu (Bob Prolux is the person who recommended me to report the bug in the first place.)
  • -unavailable- added by zhangweiwu (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Dec 2010 02:36:55 PM UTCbonziniStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Mon 20 Dec 2010 03:14:46 PM UTCbonziniStatusNone=>Need Info
    Sat 28 Aug 2010 01:47:07 AM UTCzhangweiwuCarbon-CopyRemoved zhangweiwu=>-
    Sat 28 Aug 2010 01:46:54 AM UTCzhangweiwuCarbon-Copy-=>Added -unavailable-
    Sat 28 Aug 2010 01:45:43 AM UTCzhangweiwuCarbon-Copy-=>Added zhangweiwu

    Back to the top


    Powered by Savane 3.1-cleanup1