[Toybox] awk (Re: ps down, top to go)
Andy Chu
andychup at gmail.com
Tue May 31 00:55:05 PDT 2016
On Tue, May 31, 2016 at 12:24 AM, Roy Tam <roytam at gmail.com> wrote:
> It will be nice to count OpenSolaris /bin/sh in (CDDL license)
> https://hg.openindiana.org/sustaining/oi_151a/illumos-gate/file/711401aaa206/usr/src/cmd/sh
Do you know if this is what you get as /bin/sh on a current Illumos
release? (I think OpenSolaris is gone and it's now Illumos.)
I had thought that Solaris used a variant of ksh for Bourne/POSIX compatibility:
http://unix.stackexchange.com/questions/164203/will-a-shell-script-execute-in-solaris-if-not-which-is-the-fastest-way-to-make
"However under Solaris 10 and older, /bin/sh is not the POSIX shell
but the legacy Bourne shell which predates POSIX and is then missing
features that came later with the standard."
And also in the book Portable Shell Scripting by Seebach, it says
about Solaris: "The /usr/xpg4/bin/sh program, when it has been
installed, is a ksh88 shell modified a little to be a bit more like a
POSIX Shell."
But honestly I have no idea about Solaris versions.
This does appear to be 12 KLOC of a distinct lineage; it's hard to
tell if it is a POSIX shell. The grammar in cmd.c doesn't look like
the POSIX grammar (e.g. see comments above functions like cmd.c).
If this is what is actually on Illumos as /bin/sh, I would be
interested in running it in a VM and testing it. (I'm less interested
in stuff that is no longer used like the Minix shell.)
thanks,
Andy
More information about the Toybox
mailing list