使用#!/usr/bin/expect和bash [英] Using #!/usr/bin/expect and bash

查看:780
本文介绍了使用#!/usr/bin/expect和bash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以与/usr/bin/expect命令一起使用bash脚本吗?

Is there any way I can use bash script along with /usr/bin/expect commands?

例如,我可以在usr/bin/expect脚本中使用if语句吗?

Could I, for instance, use an if statement in a usr/bin/expect script?

推荐答案

expecttcl的扩展-因此,您可以使用tcl的编程结构-其中包括'if'.

expect is an extension of tcl - therefore you can use the programming constructs of tcl - these include 'if'.

可以使用Tcl命令手册页:tcl. tk/man/tcl8.5/TclCmd/contents.htm

Tcl command man pages are available: tcl.tk/man/tcl8.5/TclCmd/contents.htm

这篇关于使用#!/usr/bin/expect和bash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆