Multiple Choice
An administrator has a CSV file named hosts.csv . The contents of 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?
A) for ip in $(grep "Linux" hosts.csv | cut -d"," -f1) ; do echo -n "$ip,"; done
B) for ip in $( cut -d"," -f1 hosts.csv | grep "Linux") ; do echo -n "$ip,"; done
C) for ip in $(grep "Linux" hosts.csv | sed "/$1//') ; do echo -n "$ip,"; done
D) for ip in $(awk -F, '{print $1}' hosts.csv | grep "Linux") ; do echo -n "$ip,"; done
Correct Answer:

Verified
Correct Answer:
Verified
Q235: A junior administrator is configuring local name
Q236: A junior Linux administrator is optimizing a
Q237: A Linux administrator retrieved a repository of
Q238: A user requested a USB serial device
Q239: A junior systems administrator is diagnosing an
Q241: A systems administrator has deployed a Linux
Q242: A Linux administrator is testing a new
Q243: A site reliability engineer updated the latest
Q244: The following represents a partial listing of
Q245: A Linux administrator needs to take stock