What is the difference between $(command) and `command` in shell programming?

To store the output of a command as a variable in sh/ksh/bash, you can do either

var=$(command)

or

var=`command`

What’s the difference if any between the two methods?

6 Answers
6

Leave a Comment