Hi everybody
i got a question regarding line based searching
if i have file which looks for example like this:
Quote:
Host: 192.168.100.2 () bla 123
Host: 192.168.100.3 () bla 123
Host: 192.168.100.4 () bla 123
Host: 192.168.100.5 () bla 123
Host: 192.168.100.6 () bla 123
|
how am i able to extract only the ips??
afterwards it should look like this:
Quote:
192.168.100.2
192.168.100.3
192.168.100.4
192.168.100.5
192.168.100.6
|
cat file | grep Host: doesn't work and couldn't find any option to extract the ips
i heard of a awk command but don't know how the heck to use it to realize this
Any help or hint would be apreciated
Friendly Regards
Sam