nerdexam
ExamsXK0-004Questions#207
CompTIA

XK0-004 · Question #207

XK0-004 Question #207: Real Exam Question with Answer & Explanation

Sign in or unlock XK0-004 to reveal the answer and full explanation for question #207. 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-004 to see the answer

You've previewed enough free XK0-004 questions. Unlock XK0-004 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.

Full XK0-004 Practice