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