That's not what I was after. But I did find this in OpenBSD's sh man page:
Quote:
NOTES
sh is implemented as a run-time option of pdksh, with only those sh fea-
tures whose syntax or semantics are incompatible with a traditional
Bourne shell disabled. Since this leaves some sh extensions exposed,
caution should be used where backwards compatibility with traditional
Bourne or POSIX compliant shells is an issue.
|
So it indeed does function like bash, insofar that OpenBSD's modified version of pdksh checks if it has been invoked as "sh" or as "ksh", and adjusts accordingly. The only thing now is determning what presicely are those features that are disabled from their pdksh when it is invoked as
sh. They should list them in the man page, but in fact they don't. One feature difference that I have spotted so far is that "sh" mode that does not support
(( )) style arithmetic; you have to us
let. (Though
$(( )) arithmeatic expansion
does work in "sh".)