Created
June 9, 2021 11:06
-
-
Save lifeisfoo/92f483f33475ca69cb6e43cf27b196af to your computer and use it in GitHub Desktop.
A script to check if all hosts in /etc/hosts are reacheble, using fping
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 | |
input="/etc/hosts" | |
while IFS= read -r line | |
do | |
a=( $line ) | |
fping "${a[1]}" | |
done < "$input" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment