Which programming language is this?
mapfile -t hosts < servers.txt
echo "Loaded ${#hosts[@]} hosts"
for (( i = 0; i < ${#hosts[@]}; i++ )); do
ping -c1 "${hosts[i]}" >/dev/null && echo "${hosts[i]} up"
done
Answer: Bash
mapfile -t into an array, ${#hosts[@]} and a C-style for (( ... )) loop are Bash.