LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
  Search this Thread
Old 09-11-2003, 11: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, 11: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, 03:06 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration