Intermediate Linux & Shell Scripting
Q42 / 100

What is the purpose of "process substitution" and "command substitution" in bash, e.g. the difference between `$(command)` and backticks?

Correct! Well done.

Incorrect.

The correct answer is A) `$(command)` and backticks both perform command substitution, capturing the output of a command to use as a string, but `$(...)` is generally preferred because it supports nesting more cleanly and avoids tricky escaping rules associated with backticks

A

Correct Answer

`$(command)` and backticks both perform command substitution, capturing the output of a command to use as a string, but `$(...)` is generally preferred because it supports nesting more cleanly and avoids tricky escaping rules associated with backticks

Explanation

Both forms substitute the output of the enclosed command into the surrounding command line, but `$(...)` handles nested substitutions and quoting more reliably, making it the modern preferred syntax.

Progress
42/100