I am trying to read a file via SSH connect and store it to expect_out(buffer). I am a virgin to expect. Help is really appreciated. Wasted almost a day :-(
This is my simple expect scritpt:
#!/usr/bin/expect -f
match_max 100000
set timeout -1
spawn telnet $IP
expect "#"
send -- "shell\r"
expect "*Ready*"
send -- "init\r"
expect "*Ready*"
send -- "readsensor \r"
expect -- "*" <<< Output of this is a 2 digit number
set val... (5 Replies)
I have only some info into my buffer, but after a rssi command I see the folowing lines expected into buffer but not present :
rssi=-106
rssi=-109
I see in my buffer only the first part of the output, here you are a part of script :
#!/usr/bin/expect -f
#global expect_out
match_max 10000000... (1 Reply)
Greetings,
Having an issue with the expect_out(buffer). in a foreach loop through some switches I am grabbing some arp table information and writing it out to output files (1 each for each switch looped through).
The first iteration works fine. the second iteration of the loop writes the... (0 Replies)
Hi,
I am trying to write an expect script. Being a newbie in expect, maybee this is a silly doubt but i am stuck here.
So essentially , i want the o/p of one router command to be captured . Its something like this
Stats
Input Rx : 1234
Input Bytes : 3456
My expect script looks ... (5 Replies)
Hello "expect" experts
I am new at Expect. I have searched for a little while how to capture multiple lines with Expect and I am almost succeeded on that but I don't get all the lines of a command's output that the script executes on a server.
Here is how my script works in a nutshell -
... (6 Replies)
Can some one tell me how to flush expect_out(buffer)?
below is my code
expect -re {.*} {}
expect "swpackages>*"
send -i $con "trial.bat \r"
set outcome $expect_out(buffer)
expect "*continue*"
set prevreport $expect_out(buffer)
send "\r \r";
problem is :- I am getting "pre" stuffs... (0 Replies)
I have a code like this :
set ipv6_acl_max_chars test_acl_max_chars123456a789%s%d2345678ww134rt789qa23456789012345%c89012%a56789012x4r67890test_acl_max_chars1234567890.01234aabcdob34567aBC0
spawn telnet $myip
expect "Login:" { send "admin\r" }
expect "Password:" {send "admin\r" }... (0 Replies)
trying to telnet to a device, list the files, and delete them. I can get the script to telnet and log in OK, and even issue the command to list out the files. I can't figure out how to parse the expect_out(buffer) and extract the file name for use in the delete command.
the files list out like... (4 Replies)
I have a expect file like this
#!/opt/tools/unsupported/expect-5.39/bin/expect
spawn ssh -l user ip
expect_after eof {exit 0}
set timeout 10
log_file /report.txt
expect "Password:" { send "pasword\r" }
expect "$ " { send "date\r" }
expect "$ " { send "readlink /somelink\r" }
set... (7 Replies)
Discussion started by: bebehnaz
7 Replies
LEARN ABOUT SUSE
exim_convert4r4
EXIM_CONVERT4R4(8) System Manager's Manual EXIM_CONVERT4R4(8)NAME
exim_convert4r4 - Convert Exim configuration from v3 to v4 format
SYNOPSIS
exim_convert4r4
DESCRIPTION
This script is provided to assist in updating Exim configuration files. It reads an Exim 3 configuration file on the standard input, and
writes a modified file on the standard output. It also writes comments about what it has done to the standard error file. It assumes that
the input is a valid Exim 3 configuration file. A typical call to the conversion script might be
exim_convert4r4 < /etc/exim/exim.conf > /etc/exim4/exim4.conf.new
The output file MUST be checked and tested before trying to use it on a live system. The conversion script is just an aid which does a lot
of the "grunt work". It does not guarantee to produce an Exim 4 configuration that behaves exactly the same as the Exim 3 configuration it
reads.
Each option change in the new file is preceded by an identifying comment. In fact, the conversion script tends to make quite a mess of
your configuration, and you should expect to go through it afterwards and tidy it up by hand.
Unless you are running a very straightforward configuration, the automatic conversion is likely to generate a non-optimal configuration.
You should not only check it thoroughly, but also run as many tests as you can, to ensure that it is working as you expect. In particular,
you should test address routing, using -bt and -bv, and the policy controls, using -bh. If possible, you should also do some live tests
(i.e. send and receive some messages) before putting Exim 4 into service.
If you have a very complicated configuration, it is possible that exim_convert4r4 will break it in some situations, which is why thorough
testing is strongly recommended.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO exim(8), the files in /usr/share/doc/exim4-base/, especially Exim4.upgrade.gz
AUTHOR
This manual page was stitched together from Exim4.upgrade by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux
system (but may be used by others).
March 26, 2003 EXIM_CONVERT4R4(8)