Question 350
A new Linux operator is assigned this task: A developer edits a script in nano but cannot save the file because they assume Ctrl+O quits the editor. Which finding would validate the selected approach?
Explanation
Correct Answer
The script's updated contents are present after reopening it in a test session. This is specific evidence for the stated requirement. The explanation is: A terminal text editor has its own shortcuts; writing a buffer and exiting are distinct operations. The required action is: Use nano's write-out action to save and its separate exit action to leave the editor.
Incorrect Answers
This test can succeed without resolving the cause described here. It addresses: The quoted $@ expansion represents each positional argument as a distinct shell word. The relevant causal dependency is: A terminal text editor has its own shortcuts; writing a buffer and exiting are distinct operations. The required validation is “The script's updated contents are present after reopening it in a test session”.
The alternative measures an outcome associated with: Unix commands conventionally return zero for success and nonzero codes to indicate failures. It does not verify the stated failure. Here a terminal text editor has its own shortcuts; writing a buffer and exiting are distinct operations. Confirm “The script's updated contents are present after reopening it in a test session”.
That observation would verify a different mechanism: Using overwrite redirection inside each iteration discards preceding iterations' output, unlike append redirection. It would not establish whether the present failure was corrected, because a terminal text editor has its own shortcuts; writing a buffer and exiting are distinct operations. Test “The script's updated contents are present after reopening it in a test session” instead.