CompTIACompTIA
CS0-003 · Question #14
CS0-003 Question #14: Real Exam Question with Answer & Explanation
Sign in or unlock CS0-003 to reveal the answer and full explanation for question #14. The question stem and answer options stay visible for context.
Submitted by lucia.co· Mar 6, 2026Security operations
Question
A security analyst is writing a shell script to identify IP addresses from the same country. Which of the following functions would help the analyst achieve the objective?
Options
- Afunction w() { info=$(ping -c 1 $1 | awk -F "/" 'END{print $1}') && echo "$1 | $info" }
- Bfunction x() { info=$(geoiplookup $1) && echo "$1 | $info" }
- Cfunction y() { info=$(dig -x $1 | grep PTR | tail -n 1 ) && echo "$1 | $info" }
- Dfunction z() { info=$(traceroute -m 40 $1 | awk 'END{print $1}') && echo "$1 | $info" }
Unlock CS0-003 to see the answer
You've previewed enough free CS0-003 questions. Unlock CS0-003 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
#Geolocation#IP address#Shell scripting#OSINT