这个例子演示了如何在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

最新文章

  1. rabbimq连接问题处理
  2. genymotion和eclipse连接问题,一直出错
  3. cocoapods pod setup
  4. Stanford机器学习---第四讲. 神经网络的表示 Neural Networks representation
  5. lz: linux ls 变种 只显示大小和名称(包括目录)
  6. 【log】logback.xml
  7. lsof,nc
  8. poj 2635 The Embarrassed Cryptographer(数论)
  9. NSTimer运行机制和线程问题
  10. Foxmail
  11. 嵌入式Linux系统Bootloader启动调试技术(回想)
  12. MySQL query_cache_type 详解
  13. 在React中使用Redux
  14. Day-8: 面对对象编程
  15. 国内为什么没有好的 Stack Overflow 的模仿者?,因为素质太低?没有分享精神?
  16. 一文解决python模块导入
  17. XYZZY spfa 最长路 判环
  18. EL表达式运算符使用
  19. Json常用组件
  20. 关于numpy

热门文章

  1. ng2 quickstart-primeng
  2. HDU 3861 The King&#39;s Problem(强连通分量缩点+最小路径覆盖)
  3. 使用jsonp去访问跨域数据,回调使用数据
  4. Bigdecimal: Non-terminating decimal expansion; no exact representable decimal result.
  5. H5唤起app
  6. 对reducers 理解
  7. zabbix自动化运维学习笔记(服务器安装)
  8. Redis-CentOS7安装
  9. Date类型
  10. jmap和jstack使用