In a Bash script, a variable is assigned the output of a command using: result=$(ls -l). What is the purpose of the $() syntax?
Correct. Command substitution runs the command and returns its stdout.
Why this answer
The $() syntax is command substitution, which captures the output of a command and stores it in a variable.