Bird
0
0

What does an until loop do in bash scripting?

easy🧠 Conceptual Q11 of 15
Bash Scripting - Loops
What does an until loop do in bash scripting?
AIt repeats commands until the condition becomes true.
BIt repeats commands while the condition is true.
CIt runs commands only once regardless of condition.
DIt runs commands only if the condition is false.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the until loop behavior

    An until loop runs repeatedly until its condition becomes true, meaning it stops when the condition is true.
  2. Step 2: Compare options with definition

    It repeats commands until the condition becomes true. correctly states the loop repeats until the condition is true. It repeats commands while the condition is true. describes a while loop. Options C and D are incorrect behaviors.
  3. Final Answer:

    It repeats commands until the condition becomes true. -> Option A
  4. Quick Check:

    until loop = repeat until true [OK]
Quick Trick: Remember: until stops when condition is true [OK]
Common Mistakes:
MISTAKES
  • Confusing until with while loop
  • Thinking until runs only once
  • Believing until runs while condition is true

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes