1 #!/usr/bin/env bash 2 3 my_ip="$(ifconfig | grep 192.168 | sed -e 's/^.*inet //' -e 's/ netmask.*//')" 4 printf "My IP Address: %s\n\n" "${my_ip}" 5 nmap -sn "${my_ip}/24"