#!/bin/bash
# Bash commands go here
/usr/bin/expect - << EndMark
This is the expect script
expect commands go here
and here
until:
EndMark
# More bash commands go here.
exit 0
这样的事情将允许我从bash中启动一个期望脚本。但是当它进入More bash命令部分时,它将停止expect进程(以及它生成的进程)是否有可能返回到相同的期望脚本?
eg - Start expect script
- At a certain point leave the expect to bash operations
- return to the same expect script?
答案 0 :(得分:0)
没有必要离开expect进程以发出shell命令 - 您可以在expect脚本中使用system
命令。