2019-01-15 17:19:24 +0100, Joerg Schilling:
[...]
> > Note that even UNIX (POSIX+XSI) certified systems are not
> > compliant. For instance, macOS "/bin/echo" doesn't expand \n,
> > \b... as POSIX+XSI requires.
> 
> AFAIR, Apple did compile bash (like Sun did for Solaris) in a way that does 
> not 
> support -e and expands escape sequences.
> 
> Are you sure that /bin/echo is not compliant to that?
[...]

See http://austingroupbugs.net/view.php?id=1222
/bin/echo on macOS, last time I checked is the one from FreeBSD
that accepts "-n" and removes a trailing newline character if
the last 2 bytes of its last argument is the encoding of "\c"
(even if that "\" is part of a different character), but doesn't
recognise any other escape sequence.

> This then would be something that Apple needs to change since they like to 
> use 
> the UNIX trademark.

Or the POSIX+XSI specification to be updated. It's silly to
force XSI implementations to implement that inferior interface
when most non-SysV systems don't.

-- 
Stephane

Reply via email to