标签: bash
我如何像这样回显节点位置:
echo "node can be found at the following location ${which node}"
这将导致严重的替换错误。
答案 0 :(得分:2)
您可以使用:
echo "node can be found at the following location $(which node)"
$()是一个子shell,您可以在this answer中阅读有关它的更多信息:
$()