[Ilugc] shell and expect interaction

  • From: sivaramsk@xxxxxxxxxxxxx (Sivaram Kannan)
  • Date: Thu Oct 26 13:02:25 2006


Hi,

You can use autoexpect to create an expect script for you. Check whether 
this is what you want.

To use expect do this :

From pc A run the command

$ autoexpect -f abcd.exp

U get the shell prompt here.
Run a ftp,get the txt files from the other PC and close the ftp connection.

After this type exit to come back to shell.
The script abcd.exp will be an expect script,that u can modify a little and
use for automation.

To use the script use

$ expect abcd.exp
************

Thangavelu Sivaraman wrote:
Hi All,

1)What is the procedure to call an expect script from a shell script?

2)Is it possible to do the vice versa?

3)I have to form a string like "20061026-abc-recent" (i have done it with
the date command in shell script) and send it to the ftp get command.(the
ftp automation is in expect).

Pl advise.

Sivaraman
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with "unsubscribe 
<password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



-- 

with luv & regards,
siva.

"Any intelligent fool can make things bigger, more complex, and more violent. 
It takes a touch of genius and a lot of courage to move in the opposite 
direction"
-- Albert Einstein

Blog : sivaramsk.blogspot.com

Other related posts: