The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job starts new cron proccess ron76 SUN Solaris 3 05-11-2008 10:07 PM
Calling expect scripts from other expect scripts seva Shell Programming and Scripting 0 04-03-2008 10:45 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 04:32 PM
Expect and auto expect command arun_v Shell Programming and Scripting 0 03-29-2006 04:31 AM
expect script in cron Deepa Shell Programming and Scripting 4 03-03-2003 10:02 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4 Weeks Ago
Registered User
 

Join Date: Dec 2004
Location: Zürich
Posts: 146
expect and cron

I have the following expect script, which I want to run in cron. It fails however, very likely due to the fact that there's no /dev/tty available.

Code:
set timeout 30
spawn -nottycopy -nottyinit /usr/bin/ssh $hostname $command
match_max 100000
expect "password"
send -- "$password"
send -- "\r"
interact
I added the -nottycopy -nottyinit arguments in the hope that would cause spawn to not try to recreate /dev/tty but it didn't work. Also, switching of interact doesn't work. The code works on a command line.

Any ideas anyone?
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0