Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2019 16:50:58 -0800
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
Cc:        "Simon J. Gerraty" <sjg@juniper.net>, Cy Schubert <Cy.Schubert@cschubert.com>, arch@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Importing mksh in base
Message-ID:  <201901270050.x0R0owQx087680@slippy.cwsent.com>
In-Reply-To: Message from "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> of "Sat, 26 Jan 2019 16:19:51 -0800." <201901270019.x0R0JpF4096103@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <201901270019.x0R0JpF4096103@pdx.rh.CN85.dnsmgr.net>, 
"Rodney W. Gri
mes" 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.
> > 
> > > 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.
> > 
> > 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.
>
> Doesnt pdksh have a "sh" compatible mode iirc when you
> invoke it via a path of sh it behaves as a traditional
> bourne shell, also if IIRC Openbsd is doing just that,
> /bin/sh -> /bin/pdksh (hard link)

IIRC ksh had an option that allowed it to be built as /bin/sh but I 
can't find the option any more. Maybe I was mistaken. The current ksh93 
in ksh93-devel has bash support though.


-- 
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?201901270050.x0R0owQx087680>