Scott McDermott wrote:
> 
> H. Peter Anvin on Wed  8/03 10:54 -0800:
> > > > Actually $() is POSIX.
> > >
> > > It doesn't work on Solaris' /bin/sh for example.  Although I believe
> > > that is actually ksh.
> >
> > ksh traditionally used the (()) syntax.  POSIX specified $().
> 
> Hmm, I can't seem to get that to work with Solaris /bin/sh.  I've tried
> "echo ((ls))", "echo $((ls))" and "echo $(ls)".  Only "echo `ls`" works.
> 
> I would just stick with `` when you don't need nesting, for the same
> reason you would use `expr blah` rather than $((blah)).  Actually, I'm
> not sure there are any systems that don't have /bin/bash installed, and
> this is the Linux automounter after all, so perhaps $() isn't a bad
> idea.
> 

Again, this is Linux-specific code, so I really could care less what
Solaris does.

        -hpa

Reply via email to