BASH - Test Connection Simple script: Difference between revisions
From Wiki.IT-Arts.net
(Created page with "Category:Post-It == Test Connection Simple Script == <nowiki> #!/bin/bash IP_POOL="8.8.8.8 google.com 91.224.148.1 80.67.169.12" HITS=2 echo "#############################" echo "##### Ping" echo "#############################" for a in $IP_POOL; do ping $a -c $HITS done echo "#############################" echo "Internet IP Address"; echo "#############################"; echo "# Wget chekip.dyndns.org Method:"; wget -q -O - checkip.dyndns.org|sed -e 's...") |
No edit summary |
||
Line 7: | Line 7: | ||
IP_POOL="8.8.8.8 | IP_POOL="8.8.8.8 8.8.4.4 google.com" | ||
HITS=2 | HITS=2 | ||
Latest revision as of 08:56, 11 November 2024
Test Connection Simple Script
#!/bin/bash IP_POOL="8.8.8.8 8.8.4.4 google.com" HITS=2 echo "#############################" echo "##### Ping" echo "#############################" for a in $IP_POOL; do ping $a -c $HITS done echo "#############################" echo "Internet IP Address"; echo "#############################"; echo "# Wget chekip.dyndns.org Method:"; wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'; echo "############" echo "# Curl ifconfig.me Method:"; curl ifconfig.me; echo "" echo "##############################" echo "##### Traceroute 8.8.8.8" traceroute 8.8.8.8 echo "#############################" echo "##### /etc/resolv.conf" echo "#############################" cat /etc/resolv.conf echo "#############################" echo "##### route -n" echo "#############################" route -n exit 0