Skip to content
RED SAGSkills
hard20 pts · first answer countslinuxbashssh

Loop stops after the first host

This loop should run uptime on every host in hosts.txt, but it only reaches the first one. Why?

while read -r h; do
  ssh "$h" uptime
done < hosts.txt
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions