sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: [SM-Discuss] Automating rsync through a script
- From: Andrew <afrayedknot AT thefrayedknot.armory.com>
- To: sm-discuss <sm-discuss AT lists.ibiblio.org>
- Subject: Re: [SM-Discuss] Automating rsync through a script
- Date: Tue, 30 Sep 2003 07:46:32 -0700
> #!/usr/bin/expect -f
> spawn rsync --rsh=/usr/bin/ssh -acz --stats
> dkowis AT gambit.gotdns.org:/home/cvsroot /home
> expect "Password:"
> send "\r"
today is your lucky day, i learned expect to make prometheus interact
with cast.
your expect program ends after you send the password, it has nothing else
to do, so it just quits, and if the programs its running arent finished
yet, oh well.
there are two things you could do:
expect eof
which will wait for an end of file, which is normally okay for simple stuff
that only sends one eof.
The other solution is running
interact
which basically tells expect to 'step back' and let the user handle any
thing else.
"Password:" might work better as "password:", depending on what ssh gives you.
and if all else fails, try autoexpect :)
Hope that helps.
-Andrew
--
________________________________________________________________________
|Andrew D. Stitt | astitt AT sourcemage.org |
|irc: afrayedknot | afrayedknot AT t.armory.com |
|aim: thefrayedknot or iteratorplusplus | |
|Grimoire Guru ham/smgl, Porting Team Lead | ftp://t.armory.com |
|Author and Maintainer of Prometheus | |
-------------------------------------------------------------------------
-
[SM-Discuss] Automating rsync through a script,
David Kowis, 09/30/2003
-
Re: [SM-Discuss] Automating rsync through a script,
Andrew, 09/30/2003
- Re: [SM-Discuss] Automating rsync through a script, David Kowis, 09/30/2003
-
Re: [SM-Discuss] Automating rsync through a script,
Casey Harkins, 09/30/2003
- Re: [SM-Discuss] Automating rsync through a script, Mads Laursen, 09/30/2003
- Re: [SM-Discuss] Automating rsync through a script, Andrew, 09/30/2003
-
Re: [SM-Discuss] Automating rsync through a script,
Andrew, 09/30/2003
Archive powered by MHonArc 2.6.24.