Which command in a shell script is used to break out of a loop prematurely?
- break
- continue
- exit
- return
The break command in a shell script is used to break out of a loop prematurely. When encountered, it immediately exits the loop and continues with the next statement after the loop. This is handy for situations where you want to exit a loop based on a specific condition.
Loading...
Related Quiz
- You are debugging an application and need to trace the system calls it makes. Which tool in Linux would you employ?
- In a shell script, which special variable refers to all the arguments passed to the script?
- The ________ statement in Bash allows for decision-making and executing different blocks of code based on a condition.
- What is the primary purpose of QEMU in Linux virtualization?
- In the context of performance tuning, what does the 'vm.swappiness' parameter control?