3 ms·
As much of the scripting that I am required to maintain emerged from HP-UX, the "POSIX" shell on my legacy platform emerged from Korn (and I have the manual pag
by chasil 6y ago
As much of the scripting that I am required to maintain emerged from HP-UX, the "POSIX" shell on my legacy platform emerged from Korn (and I have the manual page to prove it - the text of the HP-UX "POSIX" shell manual page includes arrays and a number of other Korn features).
The reason that the POSIX shell is not Korn is the existence of Microsoft Xenix, where the maximum size of the code/text segment is 64k.
Debian chose the POSIX standard for precisely this reason: a minimal text segment.
One particular thing that I like about Korn is this:
function getv { nameref var="$1"; shift; print "$@"; read var; }
This cannot be done with (my versions of) "bash." ShellCheck flips a gasket over this (legal) syntax.
I will post some of my scripting that uses this feature if you have interest.