Hi,
new Alpine user here.
I have a script that I have used elsewhere in many places that I have problems
running on Alpine. It is written to use ksh (Korn Shell). I installed mksh and
aliased it to ksh (with a symlink); I get the error below. I then tried oksh
with the same result.
I have been using ksh93 on Debian, RedHat, BSD, ... without issues.
The line that is causing problem is below - this sets up an array. mksh & oksh
do not support this:
typeset -A LongOpts=([help]=0 [me]=1)
Is there any reason why ksh93 not be ported to Alpine ?
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 https://www.phcomp.co.uk/
Parliament Hill Computers. Registration Information: https://www.phcomp.co.uk/Contact.html
#include <std_disclaimer.h>
On 15 July 2026 13:00:53 BST, alain williams <addw@phcomp.co.uk> wrote:
>I have been using ksh93 on Debian, RedHat, BSD, ... without issues.>>The line that is causing problem is below - this sets up an array. mksh & oksh>do not support this:>> typeset -A LongOpts=([help]=0 [me]=1)>>Is there any reason why ksh93 not be ported to Alpine ?
As far as I can tell, the only reason is lack of interest. There's only been a handful of users interested in it: https://gitlab.alpinelinux.org/alpine/aports/-/work_items/7801
Does a docker image exist?
+1 for podman in this case..
On Wed, Jul 15, 2026 at 8:43 AM Naomi Rennie-Waldock <
naomi.renniewaldock@gmail.com> wrote:
> On 15 July 2026 13:00:53 BST, alain williams <addw@phcomp.co.uk> wrote:> >I have been using ksh93 on Debian, RedHat, BSD, ... without issues.> >> >The line that is causing problem is below - this sets up an array. mksh &> oksh> >do not support this:> >> > typeset -A LongOpts=([help]=0 [me]=1)> >> >Is there any reason why ksh93 not be ported to Alpine ?>> As far as I can tell, the only reason is lack of interest. There's only> been a handful of users interested in it:> https://gitlab.alpinelinux.org/alpine/aports/-/work_items/7801>
On Wed, Jul 15, 2026 at 10:58:08AM -0400, B. Cook wrote:
> Does a docker image exist?> > +1 for podman in this case..
I don't know podman.
A trivial Dockerfile that gets you the ksh93 shell as packaged for
Debian:
FROM debian:latest
RUN apt-get update && apt-get install --yes ksh
RUN useradd -m ksh-user
USER ksh-user
WORKDIR /home/ksh-user
ENTRYPOINT ["ksh"]
Building and running it:
$ docker build -t ksh93 .
$ docker run --rm -it ksh93
~ [1]$ echo $KSH_VERSION
Version AJM 93u+m/1.0.10 2024-08-01
~ [2]$ exit
> > > On Wed, Jul 15, 2026 at 8:43 AM Naomi Rennie-Waldock <> naomi.renniewaldock@gmail.com> wrote:> > > On 15 July 2026 13:00:53 BST, alain williams <addw@phcomp.co.uk> wrote:> > >I have been using ksh93 on Debian, RedHat, BSD, ... without issues.> > >> > >The line that is causing problem is below - this sets up an array. mksh &> > oksh> > >do not support this:> > >> > > typeset -A LongOpts=([help]=0 [me]=1)> > >> > >Is there any reason why ksh93 not be ported to Alpine ?> >> > As far as I can tell, the only reason is lack of interest. There's only> > been a handful of users interested in it:> > https://gitlab.alpinelinux.org/alpine/aports/-/work_items/7801> >
--
Matti Andreas Kähäri
Uppsala, Sweden
///