Created
February 16, 2022 07:00
-
-
Save patsevanton/c414863a127c25aab916271230f1df6e to your computer and use it in GitHub Desktop.
check-connection-by-list-ip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a arr=("10.0.0.01" "10.0.0.2" "10.0.0.3") | |
#sudo yum install -y nc | |
for i in "${arr[@]}" | |
do | |
nc -w 2 -v "$i" 80 >> 1.txt 2>&1 | |
nc -w 2 -v "$i" 443 >> 1.txt 2>&1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment