Command Substitution—Two Ways
The example in the “Double Quotes” section containing the syntax `date` is an example of command substitution. Command substitution occurs when a command is included as part of the line of code (such as `date`), and when the line is interpreted, the part of the line containing the embedded command is replaced with the output of the embedded command. Two ways of using command substitution are available. The first way is the way shown earlier in the chapter. This method simply places back tics around the command. The back tics are easily confused with the apostrophes. The apostrophe is near the Enter key on most keyboards, whereas the back tic is found above the Tab key in the upper-left of the keyboard (usually). ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access