标签[expect]

Expect是Tcl脚本语言的Unix / Linux扩展。 它被设计为自动化和测试工具,与复杂的程序(如远程外壳程序和安全维护)进行交互非常简单。 它具有特别强大的响应识别能力。

1
1回复
31

期望脚本条件中的默认路径

I'm trying to create an expect script where it will execute every expect condition except the last.我正在尝试创建一个期望脚本,它将执行除最后一个之外的每个期望条件。 For instance:例如:s
0
1回复
38

如何在expect脚本中使用bash脚本中的导出变量?

I have this script which is a combination of bash and expect script.我有这个脚本,它是 bash 和 expect 脚本的组合。#!/bin/bash#!/usr/bin/expectexport TART="4 5 8 9"for
0
0回复
35

如何循环直到我没有得到任何列出的选项作为提示

How can I loop on below until I don't have those options as "yes", "assword" or "vt100"?我如何才能在下面循环直到我没有“是”、“assword”或“vt100”这些选项?expect { "yes"
0
0回复
26

如何使用expect发送变量加字符串

set user [lindex $argv 0]expect ">" {send "passwd $user\r"}sleep 1 trying to send the variable and string 01 to generate a password if the user va
0
2回复
57

Expect命令并不总是将输出打印到文件

I have a main_parent_script.sh inside which I am calling one more parent_script.sh which has the below command:我有一个main_parent_script.sh在里面我再调用一个paren
-1
2回复
43

为gdb调试器脚本提供输入

I want to pass some inputs to my gdb debugger to automate it.我想将一些输入传递给我的 gdb 调试器以使其自动化。 Something like this:像这样的东西:Enter number of inputs:5Enter 5 in
0
0回复
28

paramiko-expect更改密码

I have several routers running OpenWRT and I'd like to configure them with a python script using paramiko.我有几个运行 OpenWRT 的路由器,我想使用 paramiko 用 python 脚
1
0回复
19

ReactUnitTestexpect/nwb如何模拟componentDidMount

I have my InputLocation Component with children:我有我的 InputLocation 组件和孩子: InputName输入名称 DrawLocation绘制位置I want to make some unit test to check my com
2
2回复
32

期望-re不会在eof上失败

I have the following expect script.我有以下期望脚本。 This is test.exp这是test.exp#!/usr/bin/expect# exp_internal 1# log_file -noappend ~/expect.log# Use `send_l
0
0回复
11

运行shell脚本通过jenkinsssh远程服务器,一旦登录服务器,连接就会断开

My shell script is:我的shell脚本是:#!/usr/bin/expect -fset image [lindex $argv 0]set version [lindex $argv 1]send_user "$image $version"set timeout 10#spaw
0
0回复
60

单元测试期望脚本

I have an expect script that I would like to do unit-tests for, but I'm unsure how to go about it.我有一个期望脚本,我想对其进行单元测试,但我不确定如何去做。 My initial thought wa
0
1回复
35

如何使用bash脚本自动进行远程登录

I'm trying to automate a remote login and I wrote the following bash script:我正在尝试自动进行远程登录,并编写了以下 bash 脚本:#! /bin/bashPWD=abckinit -f user@domain.comex
0
0回复
48

在openvpn之后运行脚本

I've wrote a script to start openvpn (called vpn_up) but then I want it to also run my firewall script (called firewall_up) after starting the vpn.我已经
0
1回复
23

Linuxsh+expectcisco设备静态路由改变脚本

I've got following scripts and now I faced following problem in some network changes using this script.我有以下脚本,现在我在使用此脚本的某些网络更改中遇到以下问题。 .sh script .sh
0
0回复
08

预期脚本在预期EOF之后不会终止

An expect script wants to wait for confirmed termination of a spawned process by explicitly wating for eof , but expect never exits.期望脚本希望通过显式等待eof来等待
0
0回复
41

TCL\\Expect::spawnssh显示“系统找不到指定的文件”错误

I am facing a Problem, while doing spawn ssh in windows.我在Windows中执行生成ssh时遇到问题。% spawn ssh root@4.2.2.2The system cannot find the file specified. I ha
0
0回复
10

生成期望的进程和仅期望的生成过程的日志标准输出

I am so sorry but I am really confused as to how stdout and logging works on Expect.我很抱歉,但是我对stdout和logging如何在Expect上工作感到非常困惑。 Actually I just want to
0
2回复
23

语法匹配方括号中的字符串(例如“[astring]”)吗?

I'm rather new to expect (and TCL), but not new to programming.我相当期待(和TCL),但对编程却不是新手。 However I'm fighting a problem I cannot solve (using expect 5.45
0
1回复
22

期望:如何取消`expect_before`和`expect_after`?

It seems that using expect_before or expect_after once, they are applied to any expect following, causing unexpected timeouts.似乎一次使用expect_before或expe
-1
1回复
21

Expect脚本中的条件导致其挂起

I'm using an expect script (within a bash script) to ssh into a remote server and execute a script, the local server will know that the remote server'

1 2 3 4 5 6 7 8 9 10 下一页