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 Reply

Your email address will not be published. Required fields are marked *