...aaand apparently rep doesn't transfer from one StackExchange site to another. Oh well, here's the comment I would have liked to have added to the accepted answer:

While I generally agree with [@l0b0's answer](http://unix.stackexchange.com/a/118438/117659) here, I suspect the placement of bare backticks in the "worst to best" list is at least partly a result of the assumption that `$(...)` is available everywhere. I realize that the question specifies Bash, but there are plenty of times when Bash turns out to mean `/bin/sh`, which may not always actually be the full Bourne Again shell.

In particular, the plain Bourne shell won't know what to do with `$(...)`, so scripts which claim to be compatible with it (e.g., via a `#!/bin/sh` shebang line) will likely misbehave if they are actually run by the "real" `/bin/sh` – this is of special interest when, say, producing init scripts, or packaging pre- and post-scripts, and can land one in a surprising place during installation of a base system.

If any of that sounds like something you're planning to do with this variable, nesting is probably less of a concern than having the script actually, predictably run. When it's a simple enough case and portability is a concern, even if I expect the script to *usually* run on systems where `/bin/sh` is Bash, I often tend to use backticks for this reason, with multiple assignments instead of nesting.

Having said all that, the ubiquity of shells which implement `$(...)` (Bash, Dash, et al.), leaves us in a good spot to stick with the prettier, easier-to-nest, and more recently preferred POSIX syntax in most cases, for all the reasons @l0b0 mentions.

Aside: this has shown up occasionally on StackOverflow, too –

- [Command substitution: backticks or dollar sign / paren enclosed? [duplicate] (Feb 2012)](http://stackoverflow.com/a/9406408)
- [Shell Programming: What's the difference between $(command) and \`command\` (Jan 2011)](http://stackoverflow.com/q/4708549/1004235)