The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Strange expect problem Ant1815 UNIX for Dummies Questions & Answers 2 02-12-2009 05:01 AM
expect scripting need help thepurple Shell Programming and Scripting 3 12-02-2008 03:39 AM
Help required on expect scripting ayyappakumar UNIX for Dummies Questions & Answers 1 05-29-2007 05:04 AM
Expect and auto expect command arun_v Shell Programming and Scripting 0 03-29-2006 07:31 AM
Misunderstanding of sort behavior chlorine Shell Programming and Scripting 2 10-04-2005 02:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-10-2008
v1k0d3n's Avatar
v1k0d3n v1k0d3n is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 2
Question strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy).

I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed. What I'm trying to do is set the stty echo and stty -echo command several times in the script to show or not show user input (for things like passwords etc). Instead, I get a buffer overflow whenever I try to unset the stty output (i first set it with stty -echo then later with stty echo). Has anyone else experienced this? Thanks for any help!
  #2 (permalink)  
Old 12-10-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
I'm not an expect expert, but stty should be no problem. You probably have a bug somewhere else. The only thing with stty is that you're supposed to use the builtin in stty:
Do not do this: exec stty -echo
Do this: stty -echo

It says here, in my expect book, that the reason is that stty is not standard. I have found stty to be standard for stuff like this, but I would follow the book's technique anyway.
  #3 (permalink)  
Old 12-10-2008
v1k0d3n's Avatar
v1k0d3n v1k0d3n is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 2
Exclamation

Quote:
Originally Posted by Perderabo View Post
You probably have a bug somewhere else.
Sure nuf...this is a bug. For future ref, here is the system OS and version numbers:

SUSE LINUX 11.0
Linux HOSTNAME 2.6.25.18-0.2-pae #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386 GNU/Linux
expect version 5.44.1.5
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0