[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: use readable $(cmd) syntax instead of unreadable `cmd`



Steve Greenland <steveg@moregruel.net> writes:
> "John H. Robinson, IV" <jaqque@debian.org> wrote:

>> The only problem I see with $() is that older /bin/sh (SunOS) does not
>> support $(), but it does support ``.
>> 
>> When I make a /bin/sh, I want it able to be run on a /bin/sh, even if
>> that /bin/sh is on SunOS.

> Then you have a lot more problems than `` vs $(). Debian's (and pretty
> much everybody elses) /bin/sh is POSIX, and allows any valid POSIX
> construct. Solaris's /bin/sh is ancient Bourne shell, and doesn't
> support a whole lot of stuff in common use.

Yup.  You get very used to writing in the restricted common subset when
you have software that has to work on Solaris /bin/sh, but remembering
what's allowed and what isn't is complex enough that it's a lot easier to
write *all* your shell scripts in that restricted common subset and be
sure.

I get nervous when I even use shell functions.  :)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: