[Toybox] New toy: grep

Rob Landley rob at landley.net
Mon Feb 27 22:37:01 PST 2012


On 02/27/2012 03:08 PM, Andre Renaud wrote:
>> Since toybox prioritizes simplicity over performance, it may or may
>> not end up being useful.
> 
> I'm curious about this as well

By the way, part of what I'm thinking here is getting grep and sed to
share code.  A lot of grep is basically sed -n -e "/myregex/p" .  (Also
the tac shell wrapper around sed might work as well leveraging the sort
infrastructure instead, I'm looking at the id/whoami patch and trying to
massage the infrastructure to gracefully handle that sort of command
clump.  I might just end up continuing what I've been doing: copying
lots of stuff to lib/lib.c if it's shared...)

The page Tim linked to has some excellent implementation suggestions,
I'm just not sure which subset of them will be appropriate for "leverage
what libc is doing for us" and which of them are "poke the libc guys to
fix their stuff". I need to look at bionic, but it takes 25 gigs to
install the android open source project's ice cream sandwich build
environment, and my netbook only has 13 free at the moment. (It's a todo
item...)

Anyway, I'm getting incoherent.  Bedtime...

Rob

 1330411021.0


More information about the Toybox mailing list