On Mon, Sep 16, 2024 at 4:38 AM Peter Gutmann via cfarm-users <cfarm-users@lists.tetaneutral.net> wrote: > > Denis Ovsienko via cfarm-users <cfarm-users@lists.tetaneutral.net> writes: > > >I ran into this particular thing after following the advice of shellcheck and > >replacing `` with $(), which promptly broke the script on Solaris 10, which > >is supposed to be POSIX-compliant, at least in the shell department. As far > >as I remember, eventually the explanation was that in Solaris before 11 /bin/ > >sh conformed to an older version of POSIX that does not have $(). So my > >script ended up using `` again and disabling shellcheck warning SC2006. > > Ah, good to know! I've added special-case code paths for the Sun version to > use ``, more to document the issue than anything else since it's otherwise > identical to $().
`` and $() and not quite the same. The big reason for me is, $() can be nested, but `` cannot. (Or cannot easily). Also see the Bash FAQ and <https://mywiki.wooledge.org/BashFAQ/082>. > For anyone else needing to do this all it takes is: > > # shellcheck disable=SC2006 > > right before the comment about Sun braindamage that precedes each `` use. > In my case I just integrated it into the comment about Sun: > > # shellcheck disable=SC2006 # Antediluvian Sun tools Jeff _______________________________________________ cfarm-users mailing list cfarm-users@lists.tetaneutral.net https://lists.tetaneutral.net/listinfo/cfarm-users