I'm trying to filter nmap results using grep, awk, and sed to create a report. But I can't get just the "178-36-246-126.static." I imagine that i have to have a parameter "xxx-xx-xxx-xx", using these dashes. I tried deleting the first few columns but it affects the bottom rows(awk '{print $1,$2,$3,$6}').
I tried using grep -A and -B but the number of lines is not static. I tried to use sed but the IP numbers vary. It still has over 8000 lines left so I really need some help. Thanks!
178-36-246-126.static.xxxxxxxxxx.com (178.36.246.126)
PORT STATE SERVICE
80/tcp open http
178-36-246-134.static.xxxxxxxxxx.com (178.36.246.134)
PORT STATE SERVICE
80/tcp open http
443/tcp open https
3389/tcp open ms-wbt-server
178-36-246-145.static.xxxxxxxxxx.com (178.36.246.145)
PORT STATE SERVICE
80/tcp open http
443/tcp open https
178-36-246-147.static.xxxxxxxxxx.com (178.36.246.147)
PORT STATE SERVICE
443/tcp open https