Date: Sat, 26 Jan 2019 16:44:33 -0800 From: Cy Schubert <Cy.Schubert@cschubert.com> To: "Simon J. Gerraty" <sjg@juniper.net> Cc: Cy Schubert <Cy.Schubert@cschubert.com>, Baptiste Daroussin <bapt@FreeBSD.org>, arch@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: Importing mksh in base Message-ID: <201901270044.x0R0iXvj083450@slippy.cwsent.com> In-Reply-To: Message from "Simon J. Gerraty" <sjg@juniper.net> of "Sat, 26 Jan 2019 15:54:12 -0800." <32153.1548546852@kaos.jnpr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <32153.1548546852@kaos.jnpr.net>, "Simon J. Gerraty" writes:
> Cy Schubert <Cy.Schubert@cschubert.com> wrote:
> > Interactively ksh93's command completion listing looks unconventional
> > but it functions the same.
> >
> > However programmatically it's the standard. Large commercial vendors,
> > like Oracle, still require ksh for its array handling among other
> > things.
>
> pdksh (hence I assume mksh) has had array support for ages.
> The only thing I ever found it useful for was cd history,
> and I actually have an implementation of that for sh that does not need
> arrays.
IIRC it's not compatible.
>
> > It has that advantage. For embedded this is an advantage. However if
> > embedded is using ksh as a scripting language mksh and pdksh aren't
>
> As noted earlier I've used [pd]ksh as shell for 30 years.
> I do *not* write ksh scripts (except for .kshrc etc ;-)
>
> The beauty of ksh as interactive shell is it's (mostly) compatability
> with /bin/sh - which scripts should be written in.
Looking at ksh93-devel sources there is a SHOPT_BASH option, which
emulates a Bash shell. The emulation is not complete though.
14-06-02 +When compiled with the SHOPT_BASH and run with the name bash,
the shell now uses dynamic scoping for name() and function
name.
In addition the builtins declare and local are supported.
The SHOPT_BASH option is on by default in the Makefile.
More work remains with the bash compatibility option.
>
> Now on some systems (HPUX springs to mind ;-) /bin/sh is so bad that
> one has to use ksh to run scripts - but they are still sh scripts.
IMO HP/UX is as good as dead. I've never had anything good to say about
HP/UX.
--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901270044.x0R0iXvj083450>
