shell脚本中执行sql的例子

这个例子演示了如何在shell脚本中执行多个sql来操作数据库表。

#! /bin/sh
USER_HOME=/home/`whoami`
. /etc/profile
if [ -f ${USER_HOME}/.bash_profile ];
then
        . ${USER_HOME}/.bash_profile
fi

mysql -h 20.1.4.89 -P 8911 -ujifei30 -pNapnUszJD -Dtpssprod <

 

你可能感兴趣的:(小程序)