使用 $(command) 而不是反引号。 嵌套的反引号要求用反斜杠转义内部的反引号。而 $(command) 形式嵌套时不需要改变,而且更易于阅读。
例如:
# This is preferred: var="$(command "$(command1)")" # This is not: var="`command \`command1\``"