I have a text file with following contents:
NAME REGION ADDRESS STATUS
instance-name europe-west1 1.2.3.4 IN_USE
instance-name-2 europe-west1 1.3.2.4 IN_USE
instance-name-3 europe-west1 1.5.3.2 IN_USE
I want to extract the IP address only from "instance-name-3". How would it be possible in that situation?
For example, this allows me to find all the IP addresses, but I only want the "instance-name-3" one:
grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0
-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" iplist.txt