Difficulty: Easy
Correct Answer: ;
Explanation:
Introduction / Context:
Command chaining improves productivity by letting you run several commands in order without new prompts. Understanding the correct separator character avoids syntax errors and ensures the shell executes each command sequentially regardless of prior exit codes (unless you use conditional operators like && or ||).
Given Data / Assumptions:
Concept / Approach:
The semicolon '; ' separates commands on a single line. For example, 'mkdir build; cd build; make' executes three commands in sequence. Alternatives such as '&&' and '||' are conditional separators based on success or failure; they are not single-character plain separators like ';'.
Step-by-Step Solution:
Verification / Alternative check:
Run a short chain and observe that each command executes in order. Insert an intentional failure to see that, unlike '&&', a semicolon does not prevent the next command from running.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting spaces where required by certain commands, or mixing separators with unquoted special characters that the shell expands unexpectedly.
Final Answer:
;
Discussion & Comments