All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
2answers
10k views

How to redirect output to a log from expect command

I have the following code. How can I redirect the output of the expect to a log file to see if the scp has copied everything successfully. This piece of my code runs in background. export ...
0
votes
2answers
120 views

How can I update a unique string in a shell-script with the output of a seperate function?

Due to my laziness, I have written an extremely "messy" series of scripts in order to auto-initiate my openvpn. The configuration file I am using comes vpnbook.com/freevpn. To get the password I use:...
2
votes
3answers
775 views

Cat in expect script adds new line to end of string

I have the following in an expect script spawn cat version expect -re 5.*.* set VERSION $expect_out(0,string) spawn rpm --addsign dist/foo-$VERSION-1.i686.rpm The cat command is getting the version ...
2
votes
1answer
10k views

Get the output from expect script in a variable

I have an expect script which provides the IP address: #!/bin/expect -f set nodename [lindex $argv 0] spawn virsh console $nodename expect "Escape character is" send "\n" expect "localhost login: " { ...