FreeBSD sh on Linux?
Adam Wilson
moxalt at riseup.net
Fri Mar 11 10:58:20 UTC 2016
On Thu, 10 Mar 2016 21:18:19 +0100 Jilles Tjoelker <jilles at stack.nl>
wrote:
> On Wed, Mar 09, 2016 at 08:27:05PM +0700, C Bergström wrote:
> > On Wed, Mar 9, 2016 at 8:13 PM, Jason Hellenthal
> > <jhellenthal at dataix.net> wrote:
>
> > > On Mar 9, 2016, at 02:06, Brendan Sechter <sgeos at hotmail.com>
> > > wrote:
>
> > > > Is there any reason why FreeBSD sh can't be used on Linux? dash
> > > > is not a suitable login shell and bash is GNU.
>
> You'd need to do some work to make it compile. There is a package
> called libbsd which should be helpful.
>
> 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.
>
> > > 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
>
> 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).
>
> > /* not meaning to be a troll */
>
> > 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.
>
> 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.
More information about the freebsd-hackers
mailing list