作者:手机用户2502856985 | 来源:互联网 | 2018-04-11 15:33
bitsCN.com
该脚本是先删除已经存在的文件,然后后台执行SQL语句将其执行结果以一定的格式写入文件
#!/bin/bashif [ -f "/var/lib/mysql/hell.txt" ]; thenrm -f /var/lib/mysql/hell.txtecho "delete /var/lib/mysql/hell.txt" >> hell.txtfimysql -uroot -plab < bitsCN.com