"grep -w ^ file.txt" hangs

Bartosz Gołaszewski bartekgola at gmail.com
Mon Jan 6 19:08:20 UTC 2014


2014/1/6 Timo Teras <timo.teras at iki.fi>:
> Hi,
>
> Since latest bb release (1.22.0) the command:
>  grep -w ^ file.txt
>
> will hang (as long as file.txt exists and has one or more lines data).
>
> Yes, the above grep is more or less bogus, but it should still not hang.
> And it did not hang in earlier releases.
>
> I suspect the commit:
>
> commit 414db791d0dc79905e5afe20e503941b8f9778cc
> Author: Bartosz Golaszewski <bartekgola at gmail.com>
> Date:   Wed May 15 03:53:26 2013 +0200
>
>     grep: don't bail out on first mismatch if '-w' option is set
>
> To be the culprit after initial look - but have not tested.
>
> Would you Bartosz care to look at it?
>
> Thanks,
>  Timo

Hi Timo,

I have submitted a patch fixing this issue.

-- 
Pozdrawiam,
Bartosz Gołaszewski


More information about the busybox mailing list