Question 580
What is the most direct operational risk in this situation: A script must run a fallback check only when the primary check exits unsuccessfully?
Explanation
Correct Answer
The failure consequence is An incorrect && chain can run fallback only on success; this case requires Connect the commands with the shell OR-OR operator or an equivalent test of the previous exit code and evidence that A failing primary command triggers one fallback while a success skips it.
Incorrect Answers
The option would apply to “An operator writes backup.sh with Bash arrays but invokes it through sh on a non-Bash system”. The most direct risk is Using /bin/sh for Bash-only syntax can fail on dash or another POSIX shell. This question instead requires “An incorrect && chain can run fallback only on success”.
The case is most directly exposed to An incorrect && chain can run fallback only on success; the alternative describes a different operational risk.
This option serves the scenario “A maintenance script captures the literal text $(hostname) instead of the machine name”. The main exposure is Incorrect single quotes can prevent required substitution from occurring. The present scenario is distinguished by “An incorrect && chain can run fallback only on success”.