!/bin/sh
function rotate() {
logs_path=$1
t=date +"%Y%m%d%H%M"
echo Rotating Log: $1
cp ${logs_path} ${logs_path}.${t}.log
echo "">${logs_path}
chown xmetc.xmetc ${logs_path}
scp ${logs_path}.${t}.log root@172.20.90.51:/data/logrotate/luqiaotong/lqt-api1-172.20.70.50
}
for i in $*
do
rotate $i
done