Re: Linux Bash vs. Unix Bash
Rick Warner <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <Pine.LNX.4.44.0304301622160.1978-100000@aligote.inviosoftware.com> |
On Wed, 30 Apr 2003, Brian K. White wrote: > agreed, but I find the compromise worth it. > at least when writing for ksh, you get to do this: > > #!/bin/ksh > > This is reasonably likely to exist on many boxes, and those boxes where > ksh is not installed the script will fail in a cleaner, more obvious way. > What it *won't* do is "almost work", ie: look like it's working but > actually doing some things wrong. > > And the fix, to make it work on a box where it doesn't, is simpler than > editing the script for a different shell. > > in the bargain, ksh is a lot more useful than sh Depends on the end audience. If it is productized - part of a commercial product - then you really should write to what can be expected on a standard install at your customer sites. If too many customers have problems with running the scripts then the sales folks and the support folks will beat on you to bring things into some 'lowest common denominator' state; and that brings us back to reference implementation 'sh'. Been there, survived the slings and arrows. Folks won't pay if the software does not work during evaluations; if they have paid and it does not work they threaten to take away the business, make life miserable, and support your competitors. Not worth it in the end for a few fancier widgets. - rick warner