Bird
0
0

What condition causes an until loop to stop running in bash?

easy🧠 Conceptual Q1 of 15
Bash Scripting - Loops
What condition causes an until loop to stop running in bash?
AWhen the condition becomes true
BWhen the condition becomes false
CWhen the loop variable is zero
DWhen the loop variable is negative
Step-by-Step Solution
Solution:
  1. Step 1: Understand the until loop behavior

    An until loop runs until its condition becomes true, meaning it stops when the condition is true.
  2. Step 2: Identify the stopping condition

    The loop continues while the condition is false and stops when the condition becomes true.
  3. Final Answer:

    When the condition becomes true -> Option A
  4. Quick Check:

    until loop stops when condition is true [OK]
Quick Trick: An until loop runs while condition is false, stops when true [OK]
Common Mistakes:
MISTAKES
  • Thinking it stops when condition is false
  • Confusing with while loop behavior

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes