Automation, Orchestration, and Scripting
A script uses a for loop to ping each host listed in servers.txt. When a ping fails, the script must log the host and move on to the next host without ending the script. Which statement belongs after the logging command?
Show the answer
Correct answerD. continue
The continue statement skips the rest of the current iteration and starts the next host. The break statement ends the whole loop, so the remaining hosts would never be checked.