Question 70
A Linux team implements a correction for this issue: A script reads input into a variable but backslashes in the provided path disappear. Which result best demonstrates success?
Explanation
Correct Answer
The conclusive result is A test path containing a backslash is stored verbatim. That directly verifies Use read -r with a properly quoted destination variable, which is needed because The -r flag prevents read from treating backslashes as escape instructions.
Incorrect Answers
This alternative addresses the separate case “A nightly cleanup loop processes filenames containing spaces by iterating over unquoted command substitution”. The best evidence is A test fixture with spaced filenames is handled without splitting or deleting the wrong path. The deciding requirement here is “A test path containing a backslash is stored verbatim”.
The option would apply to “A maintenance script captures the literal text $(hostname) instead of the machine name”. Expect A test assignment records the current hostname rather than the literal syntax. This question instead requires “A test path containing a backslash is stored verbatim”.
The related but distinct situation is “An administrator needs to inspect only exported variables passed to spawned processes”. Expect A deliberately unexported test variable is absent from env output. For the stated problem, “A test path containing a backslash is stored verbatim” addresses the central condition.