Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while IFS=: read -r ip ports; do
- savIFS=$IFS
- IFS=,; set -f; set -- $ports
- for port
- do
- nc "$ip" "$port" 1>/dev/null 2>&1
- case $? in
- 0 ) status="PASS" ;;
- * ) status="FAIL" ;;
- esac
- echo "$ip:$port - $status"
- done
- IFS=$savIFS
- done < ips.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement