|
Prev: . myprofile
Next: cp -pd question
From: anil_ec1 on 8 Apr 2008 08:37 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
From: Glenn Jackman on 8 Apr 2008 12:13 You may want to consider cross-posting, not multi-posting -- Glenn Jackman "If there is anything the nonconformist hates worse than a conformist, it's another nonconformist who doesn't conform to the prevailing standard of nonconformity." -- Bill Vaughan
From: Maxwell Lol on 8 Apr 2008 13:03 anil_ec1 <401anil(a)gmail.com> writes: > 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? Use a different shell. I believe perl has an expect extension. Or - you can change the source code.....
From: anil_ec1 on 8 Apr 2008 23:03 On Apr 8, 10:03 pm, Maxwell Lol <nos...(a)com.invalid> wrote: > anil_ec1 <401a...(a)gmail.com> writes: > > 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? > > Use a different shell. I believe perl has an expect extension. > > Or - you can change the source code..... no friend actually we r writing the script according to some standards already we have a frame work to implement So i need a generic program thatz y i am asking
From: Maxwell Lol on 9 Apr 2008 11:26 anil_ec1 <401anil(a)gmail.com> writes: > On Apr 8, 10:03 pm, Maxwell Lol <nos...(a)com.invalid> wrote: > > anil_ec1 <401a...(a)gmail.com> writes: > > > 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? > > > > Use a different shell. I believe perl has an expect extension. > > > > Or - you can change the source code..... > > no friend actually we r writing the script according to some standards > already we have a frame work to implement So i need a generic program > thatz y i am asking I think the problem is the length of the line is too long for the shell you are using. So as I said - either (a) fix the broken shell, or (b) use a different shell. As for (a) - You can't increase the length of the line in the shell without changing the source code of the shell and recompiling. So the other answer is to use a different shell. What's the version of the shell you are using? Which Operating system? Which revision?
|
Pages: 1 Prev: . myprofile Next: cp -pd question |