When I type ls -l $(echo file)
output from bracket (which is just simple echo'ing) is taken and passed to external ls -l
command. It equals to simple ls -l file
.
When I type ls -l (echo file)
we have error because one cannot nest ()
inside external command.
Can someone help me understand the difference between $()
and ()
?