The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
3answers
2k views

“Expect” automation tool output to shell variable

#!/bin/bash # more commands here expect << EOD spawn telnet localhost 9151 expect -exact "Trying 127.0.0.1...\r Connected to localhost.\r Escape character is '^]'.\r" send -- "AUTHENTICATE ...
3
votes
2answers
8k 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 ...
2
votes
2answers
4k 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, ...
2
votes
2answers
437 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
184 views

How do I expect 'echo -e “? \c”'?

I'm an absolute newbie to the UNIX world and have been asked to write a script that interacts with another one - but I'm stuck. The script that I interact with echos the following and I need to send a ...
1
vote
2answers
193 views

When using expect: SSHFS Transport endpoint is not connected

When I run my SSHFS connection script from bash, everything works perfectly. However, when I run the same script using the expect utility, I get the following error when I try to access the folder ...
0
votes
2answers
45 views

how to continue bash script execution when expect part is finished

I have bash script and inside it part with expect code: #!/bin/bash set -ex funct() { pass3="some_pass" expect -c " spawn su - oracle expect "Password:" send \"$pass3\n\" ...
0
votes
2answers
126 views

Use a script for a telnet session

I have a problem with my script. It seems my password is wrong. #!/usr/bin/expect set ip [lindex $argv 0] spawn telnet $ip set timeout 10 expect "Login:" send "administrator\r" expect "Password:" ...
1
vote
1answer
54 views

Automating setup of the SSH tunnel

I need to frequently login to many machines but I can only login to them from a proxy machine or using an SSH tunnel (by tunneling through that proxy machine). The problem is that I cannot use ...
0
votes
1answer
286 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
0answers
34 views

unbuffer/expect swallows the rcode when its child is signaled

unbuffer is able to pass along the return code of a process under normal circumstance, but if the process you are unbuffering is killed, for instance with a segfault, I see $? as 0 while I expect 139. ...
1
vote
0answers
81 views

Why the output is not written to log from expect script

I am trying to write the output of the netcat command including the command also to a file by logging into remote servers. But it is not writing. What am I missing ? #!/usr/bin/expect -f set user ...
1
vote
0answers
27 views

How do I securely automate inputting passwords?

I would like to automate an SSH connection so that I wouldn't have to enter password and I am not allowed to use authorized_keys. I was thinking about making an expect script but I don't know where I ...
1
vote
0answers
97 views

bash - expect and variables

I have the followin: while read line; do userinfo=$(echo $line | sed 's/@/,/') IFS=',' read -a address <<< "$userinfo" userid="${address[0]}" domain="${address[1]}" ...
1
vote
0answers
167 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 $user@000.000.000.000 expect "Password:" send "$password\r" ...
0
votes
0answers
102 views

Expect script variable matching ruined by a space

I'm trying to automate some operations with the VC systems I administer, and the manufacturer has MANY inconsistencies in their interface. I'm trying to match a system H323 name and device name, ...
0
votes
0answers
116 views

Set terminal title within expect script

I use zsh as my shell, and I wrote an expect script to automate passing my password to ssh; it works perfectly, exept that the terminal window's title is set to the name of my script. I would like to ...
0
votes
0answers
108 views

Timeout does not work in expect script

I created the following expect script in order to automate logging into a VPN: #!/usr/bin/expect set PASS [lindex $argv 0] set timeout 10 spawn vpnc expect : {send $PASS\r} ...
-4
votes
0answers
35 views

Please help me with below expect code

Can anyone please help me with below code :- spawn /usr/bin/scp /opt/ldap/unboundid/backup/binbak/ConsumerDev/binbak_`date +%Y_%m_%d`.tar ...