Linux has this syntax that looks like so:
This is called command substitution. This allows you to get information about the execution of the command instead of having it it directed to STDOUT aka the terminal screen as usual.
That is very useful actually because you can run a command and store the output in a variable and use it anywhere you want later.
A simple example you can easily play with:
This is so simple you don’t even have to add it to a script you can run it straight in your terminal in any directory you user owns.
More information can be found in this excellent book Linux command line and shell scripting bible page 277
More info about command substitution.
You must log in to post a comment.