You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
169 B

#!/usr/bin/env bash
IP="$1"
if [ -n "$IP" ]; then
nmap $IP -p0- | # Get the nmap output
cut -d '/' -f1 | #
sed -n '/^[0-9]/p'
else
echo "Print an ip address"
fi