$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #638

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.
Play Programming Languages ▸