I ran across a guy early in my IBM career who used Korn shell for literally everything. I seem to recall he created a database of sorts with Korn! And there are no doubt many ksh coders more clever than myself. I've "borrowed" many a ksh technique over my career. I remember once struggling to make a sophisticated korn shell script work in a particular, "efficient" way (or so I imagined--as I recall, I was trying to make extensive use of "non-standard" file descriptors). In my table pounding Charlie Brown frustration of trying to get the script to work the way I imagined it should, a colleague behind me calmly interjected:
"I had a college professor who drilled into our heads a mantra: First, make it work. Then, make it fast. Then make it small. Why don't you first try to get it to work in the simplest way you can imagine--never mind how clumsy and inefficient it may seem?"
I listened to my (now nameless) colleague, and I had a working prototype by EOD! Over the years since, I've fixed bugs, added features, and used the heck out of that little utility. It still runs like a charm--more useful than a Swiss army knife! And IIRC, I never did go back and try to make it more sophisticated, but I did find a few (simpler) ways to make it faster. In fact, to my great surprise, my shell script outperformed an IBM provided compiled binary program with similar functionality. Kinda of a KISS tale, I guess.
------------------------------
Mackey Morgan
------------------------------
Original Message:
Sent: Sat February 17, 2024 05:04 PM
From: Jean-Philippe Henry
Subject: ksh93
Hello,
I've also been scripting in ksh93 from 2003 until 2021.
As a system administrator I wrote some object oriented scripts thanks to this guy Using Types To Create Object Orientated Korn Shell 93 Scripts « Musings (fpmurphy.com).
It had all the features I needed (string manipulation, arithmetic operations, etc.).
Unlike bash (as far ad I know) it is possible to open several files together for writing and reading thanks to file descriptors.
The main drawback was that my colleagues were not willing to make the effort of understanding it.
As now, I still see some people writing things like i=`expr $i + 1` instead of (( i++ )) or echo $str1 " " $str2 > file instead of print -u3 -f "%s %s\n" "$str1" "$str2"
Or uglier things like var=`echo $var | awk -F. { print $1 }' | awk -F- { print $2 }'` in a 10000-iteration loop.
It upsets me.
When David Korn was hired by Google (can't remember when), the future of ksh became uncertain. As of 01/01/2024 the latest release is ksh 93u+m/1.0.8.
Sorry for my English.
Cheers,
Jean-Philippe Henry
AIX/Linux system administrator.
------------------------------
Jean-Philippe Henry
Original Message:
Sent: Sat November 20, 2021 10:01 AM
From: F. Alejandro Osso
Subject: ksh93
Hello all!
I've been scripting with ksh93 for a quite some time (especially after reading the excellent "Learning the Korn Shell - 2nd Edition", by Bill Rosenblatt & Arnold Robbins, published by O'Reilly) and decided to also try it as my interactive shell.
Out of the box it has some interesting features, like command retrieve with the arrow keys, history search and command/file name completion --much like Linux, perhaps a little better.
Has anyone tried/adopted/rejected?
Kind regards,
F. Alejandro Osso