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 > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Expect: How to read buffer for spawn Lokesh Agrawal Shell Programming and Scripting 1 06-02-2009 01:14 PM
Script to open program and send/execute command in program tuathan UNIX for Dummies Questions & Answers 1 11-19-2008 09:59 PM
brisk 0.0.9 (Spawn branch) iBot Software Releases - RSS News 0 03-14-2008 07:20 AM
brisk 0.0.2 (Spawn branch) iBot Software Releases - RSS News 0 01-31-2008 11:20 AM
spawn: not found sandy.cog UNIX for Dummies Questions & Answers 0 06-07-2007 12:38 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-22-2009
groosha groosha is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 7
send: spawn id exp3 not open

Hi,

AIX 5.3

Trying to implement script that change oracle password. Getting following errors:

send: spawn id exp3 not open
while executing
"send "xxx\r"

Any idea?
  #2 (permalink)  
Old 09-22-2009
garethr garethr is offline
Registered User
  
 

Join Date: May 2009
Location: England
Posts: 91
Looks like you're using "expect". I think we'll have to see the relevant part of your script if you want any useful feedback. (Also not sure if this is AIX-related.)
  #3 (permalink)  
Old 09-22-2009
groosha groosha is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 7
Yes it does uses expect. Here is script which gives error. Thanks for looking at this.

#!/bin/ksh

#Set Oracle Home Directory
OHD=/xxx
#Change Directory
cd /xx/yyy
#Define Script Return Code
integer RC=0
export oldpass=`cat ${OHD}/.oracle.pw`
export newpass=`cat ${OHD}/.oracle_new.pw`

/site/bin/expect <<EOF

spawn passwd oracle

expect "oracle's Old password:"
send "$oldpass\r"
expect "oracle's New password:"
send "$newpass\r"
expect "Enter the new password again:"
send "$newpass\r"
expect eof
EOF
#Set Return Code From passwd Script
RC=$?
exit ${RC}
  #4 (permalink)  
Old 09-23-2009
garethr garethr is offline
Registered User
  
 

Join Date: May 2009
Location: England
Posts: 91
Guess: Does this error mean that the "passwd" process has already exited, or didn't start, before the first send?
"send: spawn id exp3 not open"
  #5 (permalink)  
Old 09-23-2009
groosha groosha is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 7
Quote:
Originally Posted by garethr View Post
Guess: Does this error mean that the "passwd" process has already exited, or didn't start, before the first send?
"send: spawn id exp3 not open"

I figured this out. Send that use old password had wrong password which was reading from one of the files. Once I corrected value in file for old password all worked fine.

Thanks for looking at this for me.
Reply

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:45 AM.


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