This question already has an answer here:

Both give the output of the command, so what is the semantic difference between the two? Some reading led me to suspect is that $(command) is Bash syntax, and the back quotes are integrated into Unix somehow; is there any truth to this?

marked as duplicate by manatwork, slm, terdon, Anthon, jw013 Dec 30 '13 at 17:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The two have identical semantics. Backquotes were the earlier form of command substitution, but they are difficult to nest since the opening and closing delimiters are identical, requiring lots of escaping. $(...) solves that problem, as well as being more readable in certain fonts.

  • Thanks for your reply. I tried searching for duplicate questions, but google doesn't really play nice with lesser-used characters. – aenda Dec 30 '13 at 19:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.