Question 102 of 135 from exam XK0-004: CompTIA Linux+

Question 102 of 135 from exam XK0-004: CompTIA Linux+

Question

An analyst is trying to determine which public IP addresses are managed by Company A, but the script is not working correctly.

for ip in $(cat ip-list.txt)
do whois $ip | grep “Company A” > /dev/null
if [ $2 -ne 0]
then echo “Sip”
fi
done

Which of the following explains what is wrong with the script?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.