<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 20, 2024, 4:36 AM Tim Dickson via SlackBuilds-users <<a href="mailto:slackbuilds-users@slackbuilds.org">slackbuilds-users@slackbuilds.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi all, I noticed a bunch of scripts had backtick cmdsub changed.<br>
is there any technical reason?.<br>
both $(cmds) and `cmds` obviously work<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I'd imagine it has to do with backticks being legacy code and knowing they do not always provide expected results. If it weren't for the wide, wide use of them, they might've gotten formally deprecated with the intention to remove it from the code base. However, since they are so prevalent, they're likely here to stay, but it's still recommended to use $(cmd) unless you're using a ridiculously old shell prior to the POSIX era. </div><div dir="auto"><br></div><div dir="auto">You can read more about it at the following links: </div><div dir="auto"><br></div><div dir="auto"><a href="https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03">https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03</a><br></div><div dir="auto"><a href="https://mywiki.wooledge.org/BashFAQ/082">https://mywiki.wooledge.org/BashFAQ/082</a><br></div><div dir="auto"><a href="https://www.redhat.com/sysadmin/backtick-operator-vs-parens">https://www.redhat.com/sysadmin/backtick-operator-vs-parens</a><br></div><div dir="auto"><a href="https://www.putorius.net/command-substitution-bash.html">https://www.putorius.net/command-substitution-bash.html</a></div><div dir="auto"><br></div><div dir="auto">Jeremy</div></div>