[Toybox] [PATCH] find: add -printf support.

Rob Landley rob at landley.net
Sun May 26 14:13:09 PDT 2019


On 5/26/19 11:12 AM, enh wrote:
>>> Anyway, this is enough for me get started building AOSP with toybox find.
>>
>> Let's see, does it...
>>
>>   find . -type f -printf '%.3s\n'
>>
>> Of course it does. And this is why I created next_printf().
> 
> huh. i did think about that, and though i didn't test (obviously), the
> docs explicitly said that the only modifiers supported were # with %m
> (which i couldn't find anyone using, and to which there's the easy
> workaround of saying `0%m` instead) and i took their word for it.

It's more a consistency thing. If we support "stat -c %.4b README" and
"printf %.4d 3" already, _not_ doing it here is inconsistent enough to bother
me. And we've already got the infrastructure to measure it, might as well use it...

Rob



More information about the Toybox mailing list