bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27031] grep -w Operates on word level and crashes for LANG != C


From: Flemming Madsen
Subject: [bug #27031] grep -w Operates on word level and crashes for LANG != C
Date: Wed, 15 Jul 2009 07:41:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090703 Shiretoko/3.5

URL:
  <http://savannah.gnu.org/bugs/?27031>

                 Summary: grep -w Operates on word level and crashes for LANG
!= C
                 Project: grep
            Submitted by: themadsens
            Submitted on: Wed 15 Jul 2009 07:41:43 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Using the -w option causes grep to select its output on word level rather
than causing the match engine to work on word level. Also it seems that
mathces in the fist line causes crashes. LANG=C fixes all this.

$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' 
the quick brown fox jumped over the lazy dog
line 2
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | grep -w
line
line$> 
$> 
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | grep -v
-w line
the quick brown fox jumped over the lazy dog
 2
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | grep -w
fox
fox$> 
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | grep -v
-w fox
Segmentation fault
$> 
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | LANG=C
grep -v -w fox
line 2
$> echo -e 'the quick brown fox jumped over the lazy dog\nline 2' | LANG=C
grep  -w fox
the quick brown fox jumped over the lazy dog
$> 





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27031>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]