shell脚本中执行sql的例子
2024-08-21 04:21:53
这个例子演示了如何在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 -ujifei30 -pNapnUszJD -Dtpssprod <<EOF
select table_name from information_schema.tables
where table_schema = 'TPSSPROD';
select now();
exit
EOF
最新文章
- rabbimq连接问题处理
- genymotion和eclipse连接问题,一直出错
- cocoapods pod setup
- Stanford机器学习---第四讲. 神经网络的表示 Neural Networks representation
- lz: linux ls 变种 只显示大小和名称(包括目录)
- 【log】logback.xml
- lsof,nc
- poj 2635 The Embarrassed Cryptographer(数论)
- NSTimer运行机制和线程问题
- Foxmail
- 嵌入式Linux系统Bootloader启动调试技术(回想)
- MySQL query_cache_type 详解
- 在React中使用Redux
- Day-8: 面对对象编程
- 国内为什么没有好的 Stack Overflow 的模仿者?,因为素质太低?没有分享精神?
- 一文解决python模块导入
- XYZZY spfa 最长路 判环
- EL表达式运算符使用
- Json常用组件
- 关于numpy