Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2016 13:50:14 +0300
From:      Adam Wilson <moxalt@riseup.net>
To:        freebsd-hackers@freebsd.org
Subject:   Re: FreeBSD sh on Linux?
Message-ID:  <20160311135014.56c13258@riseup.net>
In-Reply-To: <20160310201819.GA5821@stack.nl>
References:  <BAY182-W443C0171FBBA73A3A2B2FAA2B30@phx.gbl> <8EC0DC6F-FA0D-4B8D-AECE-F1F797EE4D56@dataix.net> <CAOnawYoEpMc=Ad1L5QSdJQR3sT-=RfFwD28gBx0PfSp0zmJxxg@mail.gmail.com> <20160310201819.GA5821@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Mar 2016 21:18:19 +0100 Jilles Tjoelker <jilles@stack.nl>
wrote:

> On Wed, Mar 09, 2016 at 08:27:05PM +0700, C Bergstr=C3=B6m wrote:
> > On Wed, Mar 9, 2016 at 8:13 PM, Jason Hellenthal
> > <jhellenthal@dataix.net> wrote:
>=20
> > > On Mar 9, 2016, at 02:06, Brendan Sechter <sgeos@hotmail.com>
> > > wrote:
>=20
> > > > Is there any reason why FreeBSD sh can't be used on Linux?  dash
> > > > is not a suitable login shell and bash is GNU.
>=20
> You'd need to do some work to make it compile. There is a package
> called libbsd which should be helpful.
>=20
> The filename completion in FreeBSD sh also uses a FreeBSD-local patch
> to libedit. This will be problematic if you want to maintain a
> package in a distribution.
>=20
> > > It's just the ash(1) shell with a few modifications that's a
> > > little more standard than most. Shouldn't be any reason why it
> > > can't
>=20
> There are quite a few bugfixes, features and performance improvements
> that are in FreeBSD sh and not in most other ash variants, such as
> UTF-8 support, $'...' to embed control characters and Unicode more
> easily, simple command substitutions without fork() and vfork() use.
> Therefore, I think the original question is reasonable, if the
> request is for a scripting shell (including for system() and make).
>=20
> > /* not meaning to be a troll */
>=20
> > If you're going down this route - there's also ksh93 from solaris,
> > which may be easy to extract (or maybe has done so already.. not
> > sure) in my experience it's that nice balance between bare minimum
> > sh and bash.
>=20
> ksh93 is in ports.

Debian includes the 1993 version of ksh in stable. Not sure if that's
the same thing- the package name is ksh, but it conforms to the
specification from 1993 as opposed to the 1988 version.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160311135014.56c13258>