#!/bin/bash if [ ! -f "hosts" ]; then echo "No hosts file found." exit 1 fi while read line; do echo $line rsync -azr -e ssh $line . done