The expect tag has no wiki summary.
3
votes
1answer
22 views
Why is expect's interact command not working?
I am trying to automate gdb with expect. My script will start gdb, do some initialisation, and then pass the control to the user. Expect's interact command seems like the perfect tool for the job.
...
2
votes
2answers
281 views
Regular expressions with ExpectJ
I've been used the ExpectJ Java library to automate some jobs on a Linux server, however now I need to automate a job that sends a different text response for each execution. Here is the output:
Last ...
1
vote
2answers
840 views
grep output of expect script
I'm trying to run some expect language, and grep/parse the output all in one script. I want to grep the output of and look for "error" (I should note that standard linux commands like awk, sed, grep, ...
0
votes
3answers
41 views
Script to login to ssh twice
I need to login through ssh twice with a script and can't get it to work. This is what I have in my script file:
#!/usr/bin/expect
set login "user"
set addr "address1"
set addr2 "address2"
set pw ...
2
votes
2answers
2k views
Cross compiling expect for ARM
I have downloaded expect5.4 . I'm trying to cross compile it for ARM(PandaBoard) running stripped down version of linux.
In the initial setup of configuring , I try
Shell$ ./configure --host=ARM
...
0
votes
2answers
377 views
Expect script within bash & exit codes
I have a bash script that calls an expect script.
The expect script has several conditions. It ssh's into a box and executes a command, and there are different possible errors that could happen which ...
0
votes
1answer
139 views
Is expect tool availabe for ARM platform
I need to get expect (tool for automating interactive applications) for the ARM platform. Is it a readily cross compiled to ARM and is it available? I tried googling but was unable to get the ...
2
votes
1answer
67 views
sudo askpass: ask from other tty
Context
I want to setup rsync backups of my server, so I run the following command
rsync -r -e ssh --rsync-path="sudo rsync" [email protected]:/ /backup/
Ideally, that command would ask my ...
1
vote
2answers
110 views
how to escape unusual/uniq characters from expect scripts?
in expect script I can set any command or character to run it on remote machine
but the sad thing is that expect cant send the same character as they defined in the expect script
for example
I want ...
1
vote
1answer
64 views
how to replace IP address on remote host using expect
I wrote the following expect script in order to replace the IP address on remote Linux machine
I use a perl one-liner for this task
I get errors about can't read "HOME": no such variable ,
Please ...
3
votes
3answers
89 views
How to send part of the data through the pipe/file and later interactively?
I have a command I want to run, let's call it program. It is an interactive program similar to bash or python REPL.
I want to start this program with some predefined input. I tried program << ...
3
votes
2answers
589 views
bash script error stty: standard input: Inappropriate ioctl for device
I'm using here-documents in a bash script to automate installation and setup where a password is required many times. I enter the password once and the script passes it to the various commands. In ...
2
votes
2answers
197 views
How to automate connecting to multiple network devices, running a command and saving the output to a file?
I have to run a command on around 1000 network devices and save the output to a file. In a file I have a list of all the network device names that have to be connected to using SSH. I then have to run ...
1
vote
0answers
51 views
Expect can not expect the output
I have problem with my simple code,
the expect can not expect the output
set timeout 10
set user username
set password password
spawn ssh [email protected]
expect "Password:"
send "$password\r"
...
0
votes
1answer
188 views
Counting files on a remote server with ssh and an expect script
Below is my script to take count for files which are present in remote server.
But it is not working. Please help me.
#!/usr/bin/expect
spawn ssh [email protected]
expect "123"
send "123"
interact
...