What is the difference between & # 8594; result = $ (ls -l) (or) & # 8594; result = `ls -l`

I run both commands, and they both seem to be doing the same thing, is it true or is something happening that I don’t see?

These two seem to do the exact same thing:

result=$(ls -l)   
result=`ls -l`
+3
source share
2 answers

The bash man page states the following: Command submenu.

, , $, `. backquote, -stitution. $(), ; .

. , .

- sh man:

+1

Source: https://habr.com/ru/post/1731741/


All Articles