#Poll: Curious about people's attitudes towards shell scripting.
Two part question:
#Unix #UnixShell #ShellScript #ShellScripting #POSIX #PosixShell #sh #bash #zsh #csh #tcsh #ksh #pdksh #oksh #mksh
#Illumos has another #wordexp implementation (originating with Mortice-Kern, no less!) that expects a Korn (93) shell and uses its printf (and set -o), which might be tweakable to function with #OpenBSD's PD Korn shell; but like the GNU C library licence the Sun CDDL would likely be a problem.
So if one is looking for "easily", where one just imports a compatibly-licenced and #KornShell-compatible existing implementation, the answer seems to be "No.".
#Poll: Curious about people's attitudes towards shell scripting.
Two part question:
#Unix #UnixShell #ShellScript #ShellScripting #POSIX #PosixShell #sh #bash #zsh #csh #tcsh #ksh #pdksh #oksh #mksh
DUDE! Now you can define functions in shell like void foobar() {!!!
This is super great, because the only form that works in ksh, sh, and bash is function foo { for foo() {, but I really liked bash's function foo() {. So now I can fully restore it to C-style void foo() { and it works in #sh, #pdksh / #OpenBSD ksh / #ksh '93 / #mksh, and #bash! :D
@pixelherodev
I mean, it really depends. It's mostly an academic exercise.
I have at&t ksh installed on my linux daily driver, I know it's 2-4x faster than bash, but all of my scripts are still in bash (even the ones that would be trivial to convert).
20 years ago, the difference mattered a lot more to me than it does now.
I guess I'm still just wondering why #OpenBSD still uses pdksh (and why #pdksh is still a thing). Probably just history. Already audited, don't mess with it.