[Toybox] awk (Re: ps down, top to go)
Andy Chu
andychup at gmail.com
Tue May 31 01:04:51 PDT 2016
Some Googling reveals:
https://illumos.org/man/1/sh - /bin/sh is ksh93 ?
https://illumos.org/man/4/shells -- wow they have every shell under
the sun? I had heard that Solaris user space is messy, but I didn't
think it was this bad.
So I'm not sure how the source in /usr/src/cmd/sh fits in, but would
be interested to know.
If I do "grep -i posix *.c *.h", that comes up with nothing, which
makes me think it makes no effort to be POSIX compliant and thus is
probably not POSIX compliant. This is also true of the Minix shell,
but not true of dash, mksh, hush, yash (lots of posix references in
all of them).
Andy
On Tue, May 31, 2016 at 12:55 AM, Andy Chu <andychup at gmail.com> wrote:
> 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