Article 5FJCY How to get just one specific line from grep

How to get just one specific line from grep

by
witchkinkofangmar
from LinuxQuestions.org on (#5FJCY)
How can I just get the first IP address without the 'IPv4 address:' and the other two IP address lines?

Code:hammer host info --name 'hostname.corp.com' | grep 'IPv4 address'
IPv4 address: 10.1.4.179
IPv4 address: 10.1.4.179
IPv4 address: 192.168.122.10latest?d=yIl2AUoC8zA latest?i=8wkw4YsSIpc:F_PCw4plCIg:F7zBnMy latest?i=8wkw4YsSIpc:F_PCw4plCIg:V_sGLiP latest?d=qj6IDK7rITs latest?i=8wkw4YsSIpc:F_PCw4plCIg:gIN9vFw8wkw4YsSIpc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments