[CentOS] OT - Any true bourne shells out there for linux?

Tue Nov 9 11:58:05 UTC 2010
Stephen Harris <lists at spuddy.org>

On Mon, Nov 08, 2010 at 10:11:58PM -0800, John R Pierce wrote:
> but, then, I'm not sure sh on solaris is quite exactly the same as sh on 
> aix.

Right.  There's no uber-standard /bin/sh.  Very very old Unix systems
had a /bin/sh that didn't even support functions.  And let's not talk
about the different "echo" commands between OSes.  When writing portable
code in /bin/sh you always have to make some assumptions.

>  anyways, aix users usually uses ksh.  but ksh on linux is a 
> little  sketchy.

ksh93 is pretty good, but not quite as compatible as ksh88.  ksh88 was
the SVR4 standard shell (so solaris, aix, hpux, sco etc all had it).
Unfortunately ksh88 wasn't free (speech) so pdksh was created and that's
not quite compatible with ksh88  (eg 'echo hello | read a' gives different
results).  What I found funny was that zsh in ksh-compat mode was really
really close (in 1993 I converted a 700 line ksh88 script to run under zsh in
ksh-mode; required 2 changes in total).

On CentOS5 ksh-20100202-1.el5_5.1 is ksh93.  It's possible to write code
that works identically in ksh93 and ksh88 and that's pretty portable.

-- 

rgds
Stephen