On Sat, 10 Feb 2001, you wrote:
[snip]
> My preferred option would be to keep the $(...) syntax and change the
> shell it uses to ksh. I depends how portable you want it. I don't know
> of a UNIX or UNIX-like system that doesn't have ksh. ksh is preferable
> to sh for scripting in almost every way (see the recent /. interview
> with Mr Korn).
>
> Of course, the problem with this is that then you need to change the
> filename from .sh to .ksh so as not to mislead people. A solution to
> this is to leave off the .sh altogther. A better solution is to treat
> the .sh or .ksh as a source file and "compile" it to a file without the
> .sh or .ksh. This compilation step can then fill in the appropriate path
> tto the desired shell on the target system for the #! bit at the top.
Given that we are using this in a startup script, it might not be a good thing
to use ksh. I personally (and I think a lot of other people, but I'm not sure)
put ksh in /usr/local/bin, which is not necessarily available at all points
during the boot. I do this because I like to keep all things in /bin
statically linked, so it's all there when I need to do a bare minimum boot.
Also, many linux systems don't come with ksh by default. So you can guarantee
/bin/sh to be on pretty much _every_ UNIX under the Sun (sorry, couldn't
resist that pun), but ksh is not as ubiquitous.
Also ${...} does not work like that on any bash I have installed, but I'm still
RedHat 6.2 and Tru64 5.0.4, so maybe that's it.
Tom
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]