轮换目录里面的文件

替换目录里面的文件[ !-f $1 ] && { echo can not find the file:$1exit 1}[ ! -d $2 ]&& { echo can

替换目录里面的文件
[ !  -f $1 ] && { echo "can not find the file:$1";exit 1;  }
[ ! -d $2 ]  && { echo "can not find the dir:$2";exit 1; }

fileName=`basename $1`
echo "$fileName"
for f in `find $2 -name $fileName`
do
   echo "copy file $1 to $f"
   cp $1 $f
done

echo "done"