Reputation: 28770
How can I echo the node location like this:
echo "node can be found at the following location ${which node}"
This results in a bad substitution error.
Upvotes: 2
Views: 1594
Reputation: 26905
You could use:
echo "node can be found at the following location $(which node)"
$()
is a subshell you could read more about it in this answer:
Upvotes: 3