XK0-005 · Question #1202
XK0-005 Question #1202: Real Exam Question with Answer & Explanation
Sign in or unlock XK0-005 to reveal the answer and full explanation for question #1202. The question stem and answer options stay visible for context.
Question
An administrator has a CSV file named hosts.csv. The contents of hosts.csv include the following: 192.168.2.57,lnx1prd.example.com,Linux,Production 192.168.2.58,lnx2prd.example.com,Linux,Production 192.168.1.4,server15.example.com,Windows,Development The administrator needs to create a second comma-separated list of only the Linux server IP addresses. Which of the following commands would achieve this need?
Options
- Afor ip in $(grep "Linux" hosts.csv | cut -d"," -f1); do echo -n "$ip,";
- Bfor ip in $( cut -d"," -f1 hosts.csv | grep "Linux"); do echo -n "$ip,";
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.