#!/bin/bash
# echo $#
if (($# < 2)); then
echo "miss params"
exit 1
fi
echo "params: $@"
# echo "scp dir ${!#}"
count=1
for param in "$@"
do
if (($count < $#)); then
echo "scp ${!#}* root@$param:${!#}"
scp "${!#}"* root@$param:"${!#}"
count=$(($count + 1))
fi
done