Displaying only hostnames with nmap in bash

nmap -sP 192.168.1.0/24 -oG – | awk ‘/Up$/{print $3}’ | tr -d “()” | grep “\S”

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *