[Toybox] Fixed the grep thing.

enh enh at google.com
Mon Oct 17 09:46:52 PDT 2022


close ... but looks like you have some new bash syntax that mksh doesn't
support :-(
```
/system/bin/sh: syntax error: unexpected '('
FAIL: sed interleave -e and -f
echo -ne 'hello\n' | "/system/bin/sed" -e 'a abc' -f <(echo -n 'a def') -e
'a ghi'
--- expected 2022-10-17 15:57:14.712002199 +0000
+++ actual 2022-10-17 15:57:14.720002199 +0000
@@ -1,4 +0,0 @@
-hello
-abc
-def
-ghi
```

On Mon, Oct 17, 2022 at 3:55 AM Rob Landley <rob at landley.net> wrote:

> Sorry about that. (Checked in a text but not the change to grep that fixed
> it.)
>
> Speaking of grep:
>
>   $ echo -e 'one\ntwo' | grep -o ^t
>   t
>
> Debian's is producing "t" there and toybox is not. When we do NOT have -z
> input
> then a NUL in the middle of input is theoretically just another byte, and
> therefore we should NOT match it as a start of line, right? Because that's
> what
> I'm doing, but it's not what they're doing...
>
> The gnu/dammit sed, meanwhile, is acting like I expect:
>
> $ echo -e 'one\0two' | sed 's/^t/x/'
> onetwo
> landley at driftwood:~$ echo -e 'one\0two' | sed 's/t/x/'
> onexwo
>
> ... and my sed is getting that wrong. Sigh.
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20221017/7edf3a43/attachment.htm>


More information about the Toybox mailing list