need help urgently
  Home FAQ Contact Sign in
de.comp.os.unix.linux.misc only
 
Advanced search
POPULAR GROUPS

more...

 Up
need help urgently         

Group: de.comp.os.unix.linux.misc · Group Profile
Author: 401anil
Date: Apr 8, 2008 05:25

Hi,

I have written a script in tcl and expect i have to send more than
1024B data to a switch. I can send that with multiple send commands
with one expect but I want to use 1 send command only but i am unable
to send that much. I am using linux machine to run this script. One of
my friend said that it is a limitation of the shell that we r using if
this is correct then tell me how to increse that shell size?
Here I am sending my script please tell me the required
modifications..
#!/usr/bin/tcl
package require Tclx
package require Expect

spawn telnet 192.179.0.5
set command "ping6 fe80::218:feff:fe86:e480%%vlan1 data-fill "
set a
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
set b
"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111"
match_max 100000
expect "Press"
send -- "\r"
expect "*#" {
send -- "$command"
send -- "$a"
send -- "$b"
send -- "\r"
}
expect {
"*#" {
puts "\n its here"
append bufferContents $expect_out(buffer)
puts "contents are : $bufferContents"
}
}

............................
regards,
Anil A Kumar
no comments
diggit! del.icio.us! reddit!