Flushing expect_out(buffer)


 
Thread Tools Search this Thread
Top Forums Programming Flushing expect_out(buffer)
# 1  
Old 12-11-2013
Flushing expect_out(buffer)

Can some one tell me how to flush expect_out(buffer)?

below is my code
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 in my buffer followed by the data I want Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to parse expect_out(buffer)

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)
Discussion started by: imatinkerer
4 Replies

2. Shell Programming and Scripting

Jumbled output in expect_out(buffer)

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)
Discussion started by: ylucki
0 Replies

3. Shell Programming and Scripting

Expect_out help!!!

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 :-( Code is as follows expect "system32>" send "type output.csv"; send "\r"; expect "system32>" set outcome $expect_out(buffer)... (2 Replies)
Discussion started by: cityprince143
2 Replies

4. Shell Programming and Scripting

Expect_out(buffer) works but it doesn't get all lines

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)
Discussion started by: capacho6666
6 Replies

5. Programming

[SOLVED] Flushing expect_out(buffer) inside a loop

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)
Discussion started by: SuperSix4
0 Replies

6. Shell Programming and Scripting

expect_out buffer no such variable running script background

I am trying to use send and receive using expect. the expect_out(buffer) is working fine while it is running it as foreground. But the same script when it is ran as background, the expect_out(buffer) errored out. Is there any factor influence when we run script in foreground and in background? ... (0 Replies)
Discussion started by: shellscripter
0 Replies

7. Shell Programming and Scripting

expect_out(buffer) empty

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)
Discussion started by: ugobale
1 Replies

8. Shell Programming and Scripting

Help with expect expect_out

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)
Discussion started by: expect_user
5 Replies

9. Programming

stdout/stdin + flushing buffers

Hi all I've run into a snag in a program of mine where part of what I entered in at the start of run-time, instead of the current value within printf() is being printed out. After failing with fflush() and setbuf(), I tried the following approach void BufferFlusher() { int in=0;... (9 Replies)
Discussion started by: JamesGoh
9 Replies

10. UNIX for Dummies Questions & Answers

Flushing Memory

Hi All, I have a server which has an application which when stopped, doesn't seem to clear out of memory; so I end up rebooting the server. How can I flush the memory without having to reboot the server. (its running Sun Solaris 5.8) Thanking you all inadvance, Zak (2 Replies)
Discussion started by: Zak
2 Replies
Login or Register to Ask a Question
fb.modes(5)                                                  Linux frame buffer utils                                                  fb.modes(5)

NAME
fb.modes - frame buffer modes file DESCRIPTION
/etc/fb.modes contains an unlimited number of video mode descriptions. The general format of a video mode is: mode geometry <xres> <yres> <vxres> <vyres> <depth> timings <pixclock> <left> <right> <upper> <lower> <hslen> <vslen> options <value> rgba <red,green,blue,alpha> endmode OPTIONS
geometry options: xres visible horizontal resolution (in pixels) yres visible vertical resolution (in pixels) vxres virtual horizontal resolution (in pixels) vyres virtual vertical resolution (in pixels) depth display depth (in bits per pixel) timing options: pixclock length of one pixel (in picoseconds) left left margin (in pixels) right right margin (in pixels) upper upper margin (in pixel lines) lower lower margin (in pixel lines) hslen horizontal sync length (in pixels) vslen vertical sync length (in pixel lines) rgba options (only valid with truecolor): red red color bitfields (in length or length/offset) green green color bitfields (in length or length/offset) blue blue color bitfields (in length or length/offset) alpha alpha color bitfields (in length or length/offset) other options: the first value of this options is the default hsync {low|high} the horizontal sync polarity vsync {low|high} the vertical sync polarity csync {low|high} the composite sync polarity gsync {low|high} the sync on green polarity bcast {false|true} enable or disable broadcast modes. If enabled the frame buffer generates the exact timings fot several broadcast modes (e.g. PAL or NTSC). Note that this option may not be supported by every frame buffer extsync {false|true} enable or disable external resync. If enabled the sync timings are not generated by the frame buffer device and must be pro- vided externally instead. Note that this option may not be supported by every frame buffer device laced {false|true} enable or disable interlace. If enabled the display will be split in two frames, each frame contains only even and odd lines respectively. These two frames will be displayed alternating, this way twice the lines can be displayed and the vertical fre- quency for monitor stays the same, but the visible vertical frequency gets halved double {false|true} enable or disable doublescan. If enabled every line will be displayed twice and this way the horizontal frequency can easily be doubled, so that the same resolution can be displayed on different monitors, even if the horizontal frequency specifica- tion differs. Note that this option may not be supported by every frame buffer device nostd <number> select nonstandard video mode accel {false|true} enable or disable hardware text acceleration grayscale {false|true} enable or disable graylevels instead of colors INTERNALS
Generally a frame buffer display is organized as follows: +---+---------------+---+---+ | | ^ | | | | | | 5 | | | | | v | | | +---#################---+---+ | # ^ # | | | # | # | | | # | # | | | 1 # | 2 # 3 | 4 | |<->#<------+------>#<->|<->| | # | # | | | # | 6 # | | | # | # | | | # v # | | +---#################---+---+ | | ^ | | | | | | 7 | | | | | v | | | +---+---------------+---+---+ | | ^ | | | | | | 8 | | | | | v | | | +---+---------------+---+---+ 1 left margin 2 xres 3 right margin 4 horizontal sync len 5 upper margin 6 yres 7 lower margin 8 vertical sync len The area bordered with `#' is the visible display area. Horizontal and vertical frequencies can now easily be calculated, for this the sum of horizontal or vertical values are important htotal = left + xres + right + hslen vtotal = upper + yres + lower + vslen The length of one line can now be calculated with pixclock line = pixclock * htotal and we have the horizontal frequency hfreq = 1E12 / line = 1E12 / (pixclock * htotal) To get the vertical frequency vtotal must eventually adjusted. If the display is laced, vtotal must be halved or if the display is a dou- blescan one, vtotal must be doubled. Now we can calculate the length of one frame if (lace) vtotal /= 2 if (double) vtotal *= 2 frame = vtotal * line and we get also the vertical frequency vfreq = 1E12 / frame = hfreq / vtotal SEE ALSO
fbset(8), fbdev(4) 2.1 2003-08-07 fb.modes(5)