Bird
0
0

Which of the following is the correct syntax to skip the current iteration in a bash for loop?

easy📝 Syntax Q12 of 15
Bash Scripting - Loops
Which of the following is the correct syntax to skip the current iteration in a bash for loop?
Abreak
Bskip
Ccontinue
Dnext
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to skip iteration

    In bash, continue is used to skip the current iteration and move to the next one.
  2. Step 2: Check other options

    break stops the loop, skip and next are not valid bash commands.
  3. Final Answer:

    continue -> Option C
  4. Quick Check:

    Skip iteration = continue [OK]
Quick Trick: Use continue to skip current loop round in bash [OK]
Common Mistakes:
MISTAKES
  • Using break instead of continue
  • Using non-existent commands like skip or next
  • Confusing syntax with other languages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes