#!/bin/sh hosts="alf3 action2 seinfeld2 hosta hostb hostc telnet trfs193 heman130 simpsons2 simpsons1" if [ $# -gt 0 ] then hosts="$@" fi for host in $hosts do echo "Copiando a $host:" # ssh $host 'mkdir -p grupo13' scp * $host:grupo13 echo done