CompTIACompTIA
XK0-005 · Question #133
XK0-005 Question #133: Real Exam Question with Answer & Explanation
Sign in or unlock XK0-005 to reveal the answer and full explanation for question #133. The question stem and answer options stay visible for context.
Scripting, Containers, and Automation
Question
An analyst is trying to determine which public IP addresses are managed by Company A, but the script is not working correctly. Which of the following explains what is wrong with the script?
Options
- A$(cat ip-list.txt) should be changed to `cat ip-list.txt` in the for statement.
- BThe for should be changed to while in the loop.
- CThe > should be changed to 2> in the do statement.
- DThe -ne flag should be changed to -eq in the if statement.
Unlock XK0-005 to see the answer
You've previewed enough free XK0-005 questions. Unlock XK0-005 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Shell Scripting#Conditional Logic#Exit Codes#Debugging