Question 310
While preparing a Linux workstation for training, an operator finds: A student creates a directory named My Reports and then runs a command using the unquoted path, causing Bash to treat its two words as separate arguments. What acceptance evidence demonstrates that the requirement is satisfied?
Explanation
Correct Answer
This specifically verifies double quotes preserve path spaces in shell arguments: A directory listing or file copy accesses the intended My Reports path without a missing-argument or nonexistent-path error. The related engineering correction is: Pass the pathname as a single double-quoted argument or use correct escaping when invoking the desired file command. Evidence from another workflow would not establish the stated outcome.
Incorrect Answers
The student identifies the valid command-line flags and can explain the effect of a chosen combination without guessing. “Run the utility's supported help flag for basic syntax and consult its manual for deeper option semantics” would remedy that alternative situation, but it would not correct the present issue: a directory listing or file copy accesses the intended My Reports path without a missing-argument or nonexistent-path error.
“Export the needed variable in the parent shell before launching the child and confirm its value within the executed script” is the supported response when a newly started shell or script prints the intended PROJECT value while unrelated session state remains unchanged. Here the decisive response is “Pass the pathname as a single double-quoted argument or use correct escaping when invoking the desired file command”, so that different intervention does not meet the stated requirement.
A harmless echo command displays the expected text immediately while an unavailable command yields an understandable shell lookup error. “Enter the required command with valid syntax at the shell prompt and observe the resulting output or documented error” applies to that other condition. The reported evidence is a student creates a directory named My Reports and then runs a command using the unquoted path, causing Bash to treat its two words as separate arguments; this alternative would address the wrong dependency.