On 29 Apr 2002, Nicolas Mailhot <[EMAIL PROTECTED]> wrote:

> It works. I'd expect ksh to also work nicely.

Great.

Unfortunately there are these C-Shell based systems out there that
only contain a minimal Bourne Shell as /bin/sh and this one doesn't
seem to like it (trying the dumbest /bin/sh I have access to):

$ cat try.sh    
#!/bin/sh

RES=$(ls /var/log)

echo "Test| $RES |test"
$ uname -a
SunOS gump 5.8 Generic_108528-06 sun4u sparc SUNW,UltraAX-i2
$ sh try.sh
try.sh: syntax error at line 3: `RES=$' unexpected

changing $() to `` yields

$ sh try.sh
Test| authlog
sysidconfig.log
syslog
syslog.0
syslog.1
syslog.2
syslog.3
syslog.4
syslog.5
syslog.6
syslog.7 |test

so we seem to be tied to `` if we want to support Solaris or HP/UX
(don't have an HP/UX account to test, but this used to be C-Shell
based when I last had access to one seven years ago).

Cheers

        Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to