[Toybox] New toy: grep

Rob Landley rob at landley.net
Mon Feb 27 12:24:49 PST 2012


On 02/27/2012 12:09 PM, Vladimir Pantelic wrote:
> Rob Landley wrote:
>> On 02/26/2012 10:01 PM, Andre Renaud wrote:
>>>  Attached is a simplistic starter implementation of the grep command.
>>>  There are currently a few issues with it:
>>>  1. It doesn't intelligently cope with lines that fall over a 'toybuf'
>>>  read boundary. It should be stuffing the partial line back into toybuf&
>>>  appending the next read to the end.
>>
>> That's actually a concern for me: I'd like grep to be able to handle
>> unlimited-length input lines. Using toybuf for the regex might be
>> reasonable, but using it for the input data is much less so...
>>
>> Oh, and it should probably be able to handle embedded NUL bytes.  People
>> use grep and sed on executables (because they're crazy, but they do it
>> anyway)...
> 
> I do that all the time, but then, I am crazy...

I didn't say it was a _bad_ crazy. :)

Rob

 1330374289.0


More information about the Toybox mailing list