Shell导出MySql部分表及数据
2016-02-26 13:32
316 查看
#!/bin/bash
#export MySql table and table's data
#table's name in single file,shell to read this file and read by line
#shell script by okhelper ,2016-02-26
cat $1 | while read LINE
do
CMD="mysqldump -h 127.0.0.1 -uroot -proot fsdb $LINE"
echo $CMD
#sleep 1
eval $CMD |tee $LINE.sql
#sleep 1
done
echo ""
echo "backup fsdb's table complet!"
#export MySql table and table's data
#table's name in single file,shell to read this file and read by line
#shell script by okhelper ,2016-02-26
cat $1 | while read LINE
do
CMD="mysqldump -h 127.0.0.1 -uroot -proot fsdb $LINE"
echo $CMD
#sleep 1
eval $CMD |tee $LINE.sql
#sleep 1
done
echo ""
echo "backup fsdb's table complet!"
相关文章推荐
- linux运维学习shell脚本监控nginx服务
- Shell下变量比较
- shell脚本入门教程
- adb shell 基本命令
- linux下shellscript实现二分查找
- shell编程之echo printf 命令
- Java如何操作Android的adb shell 之 我自己在程序中的使用方法
- Java如何操作Android的adb shell
- 哪些晦涩难懂的shell命令都是什么的缩写?
- adb shell dumpsys命令
- linux系统shell变量入门
- 【sehll学习】linux运维一个简单shell脚本监控系统内存
- shell之磁盘容量检查
- shell之磁盘容量检查
- 自认为比较经典的shell程序
- shell脚本实例-交叉证认
- shell获取 linux 系统的位数
- powershell 工作流作业
- linux中java调用shell脚本
- ansible模块command、shell、raw、script