[Toybox] Heads up on the sed N behavior change.

Rob Landley rob at landley.net
Tue Sep 13 09:45:58 PDT 2022


There's a tiny possibility https://github.com/landley/toybox/commit/1724b3589a50
will break the AOSP build if you've been using nothing but toybox sed for years,
and people writing sed scripts have actually read posix.

That said, if Red Hat 9 from 2003 wasn't following Posix and Debian still isn't
today, then the posix behavior ain't what Linux does.

I pulled a couple other tweaks to that effect from the todo heap (Posix
EXPLICITLY says that "l" should not escape \n and yet Linux does), but mostly
because I'm going through making sure -z is always NUL instead of \n in hold
space aggregation and so on (\0 is escaped as \000 because they left it as
"unknown character below 32 gets 3 digit octal escape" which I suppose makes
sense because otherwise \0 followed by actual digits is ambiguous), and I don't
expect those to cause a problem with real scripts? (Yeah famous last words...)

Rob


More information about the Toybox mailing list