bug-grep
[Top][All Lists]
Advanced

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

Re: bug report of the 'grep'


From: Jim Meyering
Subject: Re: bug report of the 'grep'
Date: Mon, 10 Sep 2012 08:23:33 +0200

Sen Li wrote:
> Here I would like to report a bug of the command 'grep'. The case is:
>
> I need to grab all lines which contains a string 'chr1' in the very big
> text file (~1.2gb, I also send you an example of the file in the
> attachment). So I apply this command
>
> cut -f 2-9 var-${*variant_name*}-200-37-ASM.tsv | grep -vw 'no-call' | grep
> -w chr1 | grep -vw 'no-ref'
>
> In principle, this returns all lines only contain the string 'chr1' of the
> certain file, right? But sometimes I can also get several lines with other
> strings , such as 'chr12', 'chr22' etc. Well, there might be the invisible
> 'chr1' in those lines, but if I apply 'grep -w chr1' again, those lines are
> removed. And I found that this case occurs randomly, you may not observe
> this when you use my example file.
>
> I am wondering whether you have received the similar problem before,
> especially when the user apply 'grep' to a large file. Thanks for your time.

Thank you for the report.  That does sound like a bug.
First, please tell us what version of grep you are using.
Run "grep --version" to print that.
The latest is 2.14.
If you're not using the latest, can you try that?

Second, what locale are you using?
Show us what the "locale" command prints.

If the problem persists, can you share with us
a reduced input that demonstrates the problem?
Please compress it.  It's ok to provide a link,
if it's too large to post to the mailing list (>100KB).



reply via email to

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