1 #!/bin/sh
2 da=`date -v1d -v-2m +%y%m%d`
3 de=`date -v1d -v-1m -v-1d +%y%m%d`
4 da=`expr "$da" + 0`
5 de=`expr "$de" + 1`
6 echo $da
7 echo $de
8 while [ $da -lt $de ]; do
9 echo t_serv_log_0$da
10 mysqldump -h10.10.1.11 -uruser -prpass redmedia_log t_serv_log_0$da > ./t_serv_log_0$da.sql
11 da=` expr "$da" + 1 `
12 done
阅读(2628) | 评论(0) | 转发(0) |