nerdexam
CompTIA

LX0-101 · Question #346

LX0-101 Question #346: Real Exam Question with Answer & Explanation

Sign in or unlock LX0-101 to reveal the answer and full explanation for question #346. The question stem and answer options stay visible for context.

Question

The output for the command ifconfigeth0 is shown below: Eth0 Link encap:Ethernet HWaddr 00:0C:29:CB:FA:30 inetaddr:192.168.246.11 Bcast:192.168.246.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metrlel RX packets:4721 errorsrO dropped:0 overruns:0 frame:0 TX packets:3216errors:0dropped:0overruns:0 carrier:0 collisions^) txqueuelen:1000 RX bytes:445184 (434.7 Kb) TX bytes:512968 (500.9 Kb) lnterrupt:185 Base address:0xl080 Which of the following commands should be used in a bash script that needs a variable containing the IP address of the eth0 interface?

Options

  • AIP=LANG= ifconfig ethO | awk'{print $2 )' | cut -f2
  • BIP='LANG= ifconfig ethO | grep inet | cut-d: -f2 | awk {print $1 Y
  • CIP='LANG= ifconfig ethO | awk'{print $3 }"
  • DIP=$(LANG= ifconfigethO | grep inet | awk'{ print$2}' | cut-d: ^f2)
  • EIP=$(LANG=ifconfigethO| grep inet | cut-d:-f2)

Unlock LX0-101 to see the answer

You've previewed enough free LX0-101 questions. Unlock LX0-101 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 LX0-101 Practice