On Tue, 2020-09-08 at 10:31 +0200, Felix Fietkau wrote: > On 2020-09-08 10:26, David Woodhouse wrote: > > It turns out that 'echo -e' isn't portable; it doesn't work in the dash > > builtin echo and Ubuntu users are complaining. > > > > I can't even get octal (specified by POSIX) to work consistently because > > those variants of 'echo' which *do* support -e don't seem to interpret > > octalwithout it. > > > > I could switch to /bin/echo but using -e with that isn't actually > > portable *either* even though it works today. > > > > For now just stick with bash, and use its builtin. We may end up using > > something else entirely; perhaps perl. > > > > Signed-off-by: David Woodhouse <dw...@infradead.org> > > Have you considered using printf instead of echo?
I played with that for a while a few weeks ago and didn't manage to get it working in all environments either. Sometimes I need '\\x' and sometimes just '\x'. At the time I gave up as it was mostly a theoretical problem and our own builds worked, and I had more important things to fix. But now users are hitting this in practice¹ so I need to at least come up with a stopgap solution, and this was it. Better solutions welcome — and we do have a handful of other places in the tree that need fixing too, when we work out what the best approach is. ¹ http://forum.banana-pi.org/t/banana-pi-r2-openwrt-19-07-image/11323/80
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel