Skip to content

Instantly share code, notes, and snippets.

@lifeisfoo
Created June 9, 2021 11:06
Show Gist options
  • Save lifeisfoo/92f483f33475ca69cb6e43cf27b196af to your computer and use it in GitHub Desktop.
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
#!/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