Hi John, it's for nesting bash commands. Type $(command) and it will attempt to run command and then run its output. For example, on my laptop, which php returns /usr/bin/php, so $(which php) is equivalent to running /usr/bin/php. For simple commands that are in your users $PATH it's probably unnecessary, but it can be handy for more complex commands.
Hi John, it's for nesting bash commands. Type
$(command)
and it will attempt to run command and then run its output. For example, on my laptop,which php
returns/usr/bin/php
, so$(which php)
is equivalent to running/usr/bin/php
. For simple commands that are in your users$PATH
it's probably unnecessary, but it can be handy for more complex commands.