Skip Navigation

Korn Shell version p

It’s funny. With all the cool new software pouring into the market every second, why am I so interested in the humble shell? It’s not like I spend all day in the shell. Hardly. (Something to ponder...)

As of Panther, the default shell for OS X changed from tcsh to bash. Bash is a fine shell, but for a variety of vague, unexplored reasons I prefer the Korn shell. No version of OS X has even included the Korn shell, even though it was released under an open source license a few years ago.

A version of the Korn shell is available through Fink, but if you want the latest, greatest Korn shell (and you do, don’t you?) using Fink, you’ll have to “hack” the .info file (the .info file tells Fink where to get the source, etc), because the current Fink info file points to a download long gone. When this situation occurs, the FAQ recommends downloading the source to the default source location /sw/src/ and installing from there. I tried this, and it didn’t work for me, and besides, the Korn Shell has one dependency (something called INIT), so I decided it would be better to edit the .info file that Fink knows about.

Begin by checking for the latest version by consulting the release change log and look for the latest stable release (as of March 25, 2004, that is “ksh93p”). Grab the source for the darwin.ppc version of ksh93 and INIT from here and put it anywhere. Then run md5sum against the two .tgz downloads to note the checksums.

Open the .info file and look for these four lines:

 

Source: http://www.research.att.com/ \
~gsf/download/tgz/ast-ksh.2003-06-21.tgz
Source2: http://www.research.att.com/ \
~gsf/download/tgz/INIT.2003-06-21.tgz
Source-MD5: fbbcdcf490cb478f6fc2b9e0ed8d9fc4
Source2-MD5: 7f7d7eb4cfe25302a29dcce2761986f7

 

Change them to these values (I broke the URLs into two lines here):

http://www.research.att.com/ \
~gsf/download/tgz/ast-ksh.2004-02-29.tgz
Source2: http://www.research.att.com/ \
~gsf/download/tgz/INIT.2004-02-29.tgz
Source-MD5: fa91217bc99ccf9cc32b3250a2431185
Source2-MD5: cd4cc8fe24b040685451bea07f9bd163

 

Run fink install ksh93 as usual, and it should build the newest version from February 29.