1

expect -c '
spawn su - oracle -s check_tablespace.sh
expect "Password:"
send "oracle\n\r"
expect "eof"
exit
'

2 文件形式:

#!/usr/bin/expect -f
spawn su - oracle -s check_tablespace.sh
expect "Password:"
send "oracle\n\r"
expect "eof"  #上面的子进程完了会返回eof字符串
exit

最新文章

  1. [No000092]SVN学习笔记3-Import/Checkout(迁入/迁出),GetLock(加锁)
  2. 关于BFC不会被浮动元素遮盖的一些解释
  3. iOS开源项目MobileProject功能点介绍
  4. redhat centos yum源的安装
  5. Microsoft.AlphaImageLoader滤镜解说
  6. Swift方法
  7. asp.net微信公众平台开发
  8. iOS的内存管理
  9. Leetcode OJ 刷题
  10. Native App和Web App 的差异
  11. MongoDB环境安装
  12. 18 UI美化自定义形状shape
  13. 高可用Redis(十三):Redis缓存的使用和设计
  14. 基于vue-cli的改造的多页面开发脚手架
  15. 【Java】 剑指offer(52) 两个链表的第一个公共结点
  16. k8s debug
  17. 【版本管理】git远程管理
  18. Java 多线程(Thread) 同步(synchronized) 以及 wait, notify 相关 [实例介绍]
  19. [Git] Undo my last commit and split it into two separate ones
  20. pandas 语句

热门文章

  1. IOS 贝塞尔曲线切割圆角
  2. Eclipse(2019-03版本)汉化
  3. ng2学习--pipe使用
  4. BZOJ 4165 矩阵 堆
  5. I - Defeat the Enemy UVALive - 7146 二分 + 贪心
  6. OkHttp工具类
  7. Linux远程连接和FTP
  8. 引用 Session详解 作者:郎云鹏
  9. ASP.NET MVC CheckBoxFor为什么会生成hidden input控件
  10. Educational Codeforces Round 51 (Rated for Div. 2)