#!/bin/bash
for id in {2..9}
do
cnode=`printf "cnode%.2d" $id`
echo ""
echo "----------------- $cnode -------------------"
scp $1 root@"$cnode:"$2
done
사용법
./allcopy.sh <local file> <remote file>
#!/bin/bash
for id in {2..9}
do
cnode=`printf "cnode%.2d" $id`
echo ""
echo "----------------- $cnode -------------------"
scp $1 root@"$cnode:"$2
done