Top "Expect" questions

Expect is a Unix/Linux extension for the Tcl scripting language.

SSH login with expect(1). How to exit expect and remain in SSH?

So I wanted to automate my SSH logins. The host I'm with doesn't allow key authentication on this server, so …

bash shell ssh expect
How can I assign a variable using $expect_out in TCL/EXPECT?

If I want to match DEF_23 using the following regexp: expect { -re "DEF_\[0-9]*" set result $expect_out(1,string) } why …

regex tcl expect
How to get the exit code of spawned process in expect shell script?

I am trying to execute a script that executes an EXPECT script and a spawned process which has exit code …

linux bash shell unix expect
Hide output from expect

Here's part of an expect script #/usr/bin/expect spawn -noecho kwalletcli -f Passwords -e keyofmypassword expect ".*" set passwd $expect_…

linux expect
How to access environment variables in an Expect script?

I would like to access the PATH environment variable inside an expect script. How can I achieve that ? My actual …

environment-variables expect
How to return spawned process exit code in Expect script?

I use expect for running test scripts. Tests return success/failure through exit code. But expect return equivalent exit code. …

linux shell scripting expect
Can I use Expect on Windows without installing Cygwin?

Expect is a module used for spawning child applications and controlling them. I'm interested in Python and Ruby.

python ruby expect
Expect script does not work under crontab

I have an expect script which I need to run every 3 mins on my management node to collect tx/rx …

automation cron crontab expect
How to ignore or Pass 'Yes' when The authenticity of host can't be established in Expect Shell script during Automation

I want to Provide 'Yes' automatically or Ignore it and proceed in a SECURE way, when the below statement comes …

shell automation rsa expect host
How to pass variables from a shell script to an expect script?

I've shell script as below: #!/bin/bash echo "Select the Gateway Server:" echo " 1. Gateway 1" echo " 2. Gateway 2" echo " 3. Gateway 3" read gatewayHost …

bash shell expect