The $(program) or its synonym `program` ( ` - backquote, not ') are expanded by the shell to the output of "program". For example:
whereis bash
bash: /bin/bash /usr/share/man/man1/bash.1.bz2
so "ls -l $(whereis bash)" is translated by the shell to
ls -l bash: /bin/bash /usr/share/man/man1/bash.1.bz2
You may have noticed the first row of the output:
ls: bash:: No such file or directory
|