Bird
0
0

Which of the following shows the correct way to start an until loop in bash?

easy📝 Syntax Q3 of 15
Bash Scripting - Loops
Which of the following shows the correct way to start an until loop in bash?
Auntil condition then
Buntil ( condition ) {
Cuntil { condition } do
Duntil [ condition ]; do
Step-by-Step Solution
Solution:
  1. Step 1: Understand until syntax

    The until loop runs until the condition becomes true, and the syntax requires square brackets for the test condition.
  2. Step 2: Identify correct syntax

    until [ condition ]; do uses until [ condition ]; do which is the correct bash syntax.
  3. Final Answer:

    until [ condition ]; do -> Option D
  4. Quick Check:

    Check for square brackets and do keyword [OK]
Quick Trick: Use square brackets and 'do' after condition [OK]
Common Mistakes:
MISTAKES
  • Using parentheses instead of square brackets
  • Omitting the 'do' keyword
  • Using curly braces incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes