On Thu, 2014-10-02 at 22:50 -0300, Henrique de Moraes Holschuh wrote:
> Debian policy mandates that /bin/sh implement a _superset_ of POSIX, which
> is out of scope for "posh".
Regardless, posh implements all the additional features mandated by
10.4:
echo -n, if implemented as a shell built-in, must not generate a
newline.
$ posh -c "echo -n x"
x$
test, if implemented as a shell built-in, must support -a and -o as
binary logical operators.
$ posh -c "test -z '' -a -z '' && echo x; test -z '' -a -n '' && echo y";
x
$
$ posh -c "test -n '' -o -n '' && echo x; test -n '' -o -z '' && echo y";
y
$
local to create a scoped variable must be supported, ...
$ posh -c 'a=a; x() { local a b c=C; a=A; echo $a$c; }; x; echo $a$c'
AC
a
The XSI extension to kill allowing kill -signal, where signal is
either the name of a signal or one of the numeric signals ...
$ posh -c 'kill -KILL $$'
Killed
$
The XSI extension to trap allowing numeric signals must be
supported. In addition to the signal numbers listed in the
extension, which are the same as for kill above, 13 (SIGPIPE) must
be allowed.
$ posh -c 'trap "echo sigterm" TERM; kill -TERM $$'
sigterm
$
Attachment:
signature.asc
Description: This is a digitally signed message part