LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 09-11-2003, 10:32 AM   #1
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Rep: Reputation: 30
still problems with expect


i've got my script running simple stuff but it doesn't recognize any of my expect commands. right now i'm getting:

./test.sh: spawn: command not found
expect: invalid option -- r
usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]


could someone tell me if i've forgotten to configure or update or place expect and tcl like i should.....or if there is any "tag" i've forogtten.


script
//***********************************

#!/bin/sh
#!/usr/bin/expect

HOSTNAME=******
BPATH=/home/****/test

DATE=`date +%m-%d-%y`
FULLDATE=`date`


spawn "scp $BPATH/test1 remotedrive1"
expect -re "remotedrive1 password:"
send "*********\r"


cd $BPATH/

#/usr/sbin/sendmail -t -i << EOF
#To: root
#Subject: test
#test
#EOF

echo "hello"
#exit 1
 
Old 09-11-2003, 10:43 AM   #2
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
i know /usr/bin/expect exists. i go to /usr/bin and type expect and it takes me to the command line <expect1.1>
 
Old 09-15-2003, 02:06 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with expect neyoung Programming 3 02-09-2004 09:41 PM
problems with scripting in expect wedgeworth Linux - Software 1 10-07-2003 03:34 PM
How to use expect TomCruise2002 Linux - General 0 10-02-2003 09:53 PM
expect scripting syntax problems...(catch, echo,....) wedgeworth Linux - Software 2 10-02-2003 09:24 AM
problems w/ expect....."./configure" wedgeworth Linux - Software 1 09-10-2003 02:40 PM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration