Anselm R Garbe dixit:
>Can you elaborate on this functionality a bit that mksh provides, but
>pdksh doesn't?
Not easily; the last release of pdksh was in 1999, and mksh is
actively developed; even pointing out every single bugfix, for
POSuX compliance or genuine, would take several Kibibytes.
It’s developed with an attitude I’d call “suckless”, without
being part of suckless.org though. (And it’s quality software
from Germany ☺) mksh’s even got some sort of community (with
people porting to even more weird platforms than I tried myself,
users sending bugfixes, even developers of other shells jumping
in every once in a while), mostly in IRC but also on a “faux”
mailing list (Cc'd). It’s packaged for almost any modern OS with
the exception of OpenBSD, who don’t like my nose or something.
https://www.mirbsd.org/mksh.htm#clog is the starting point for
a changelog (it begins with the most recent versions but links
to mksh_old.htm#clog for older ones). The HTML source for just
the changelogs (both) is 114 KiB in 1741 hand-written lines…
Basically: if you’re considering a pdksh derivate, there is no
excuse to not use mksh, right now. Even Google Android uses it
as /system/bin/sh; it’s the system shell on MirBSD, FreeWRT and
MidnightBSD as well; I’ve run systems with mksh as /bin/sh on
NetBSD (1.6 onwards, 1.5 is incompatible), Debian, even Kubuntu…
Han Boetes has run Crux Linux with only mksh installed too.
Specific features that are not bugfixes:
• portable (with fun targets such as ULTRIX, Minix-vmd, etc.)
and low number of imports (no stdio or other bloat) with
active support for static linkage
• implements some extensions that AT&T ksh93, GNU bash, zsh do
($EPOCHREALTIME, $PIPESTATUS, fallthrough in case, …)
• UTF-8 support in the Emacs command line editing mode and
string functions
• Home/End/Delete keys work by default (in most terminals, Emacs mode)
• somewhat configurable, e.g. exclude the Vi command line editing
mode, or some of the extensions too
• consistent 32-bit arithmetics with defined wraparound even for
signed integers, independent of the host platform; mksh extension
for unsigned integer arithmetics and “base-1 integers” (taking the
ASCII code or Unicode codepoint of a character)
• unlimited array subscripts (well, 32-bit really), plus a set of
shell functions that emulate associative and multi-dimensional
arrays on top of it, until the shell itself provides them
• some more builtins, like sleep (with microseconds), rename (just
the Unix rename(2) syscall), cat (with *no* options, no cat -v here)
• completely rewritten read builtin: can read into arrays by IFS
wordsplitting or by splitting on octet or multibyte (UTF-8) character
boundary; read with timeout; read exactly or up to N bytes; etc.
• large corpus of examples, like several things written in pure mksh
like the associative/multi-dimensional array kit, base64 (NUL safe),
several simpler hashes like Jenkins’ one-at-a-time, arc4random (by
reading from /dev/urandom); an LDIF parser (calling ldapsearch, rest
is pure mksh, goes into associative arrays from above), etc:
git clone
https://evolvis.org/anonscm/git/shellsnippets/shellsnippets.git
• I consider *not* supporting recent bloat from ksh93/bash/zsh, like
floating point numbers, gettext, etc. a feature myself ;-)
• upcoming: efficient replacement for foo() { echo foo; }; x=$(foo)
mksh is OSI Certified Open Source Software under the MirOS Licence,
which is similar to BSD/MIT/X11 (plus strlcpy() for those who need
it, under the ISC licence).
Thanks for your consideration,
//mirabilos
--
16:47⎜«mika:#grml» .oO(mira ist einfach gut....) 23:22⎜«mikap:#grml»
mirabilos: und dein bootloader ist geil :) 23:29⎜«mikap:#grml» und ich
finds saugeil dass ich ein bsd zum booten mit grml hab, das muss ich dann
gleich mal auf usb-stick installieren -- Michael Prokop über MirOS bsd4grml
Received on Sat Apr 27 2013 - 21:47:34 CEST