There are two ways to capture the output of command line in bash
:
-
Legacy Bourne shell backticks
``
:var=`command`
-
$()
syntax (which as far as I know is Bash specific, or at least not supported by non-POSIX old shells like original Bourne)var=$(command)
Is there any benefit to using the second syntax compared to backticks? Or are the two fully 100% equivalent?