On Sat, Jul 06, 2024 at 02:47:20PM -0700, Greg A. Woods wrote: > At Sat, 6 Jul 2024 20:09:24 +0200, tlaro...@kergis.com wrote: > Subject: Re: POSIX.2, IFS and echo command > > > > Thanks. I think then that dash(1) is, in some circumstances (what > > version? what libc? Bug report was from a Debian node and I couldn't > > reproduce this with the dash in pkgsrc) at fault and doesn't split the > > arguments and passes "a\tb" as a single arg to echo. > > dash(1) is kind of broken, I think by design/desire. > > Herbert Xu forked a really old, and notably buggy at the time, NetBSD > /bin/sh to create dash back in mid 1997. Then for some reason he > stopped pulling in NetBSD changes and fixes early in 2002 and so dash > has diverged ever since, especially with its own unique changes. > > For some interesting reading: > > https://www.in-ulm.de/~mascheck/various/ash/ > > Go up a couple of levels for even more good reading.
Thanks for the link! Quite a good reading! (not limited to this chapter). Indeed, despite verifying POSIX.2 when I write something that has to be run on a myriad of systems, I had to limit the features used in the scripts to find a common implemented/accepted subset to all the variants given as system sh(1)---your link provides an interesting history about variants/forks and all things that were fixed or not, at various times, in all the variants and that some forks have been done once and are features fixed since---Android for example. But, BTW, for the present bug (in dash), since the pkgsrc version is up-to-date with the latest release (2022), the bug may be in the glibc since dash run on NetBSD does not exhibit the problem (or the dash in question is not the latest version; whatever). echo $var seems to behave, on this version, as echo $@, not doing field splitting. -- Thierry Laronde <tlaronde +AT+ kergis +dot+ com> http://www.kergis.com/ http://kertex.kergis.com/ http://nunc-et-hic.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C