Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Automating rsync through a script

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: David Kowis <dkowis AT shlrm.org>
  • To: sm-discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] Automating rsync through a script
  • Date: Tue, 30 Sep 2003 09:57:28 -0500

Sure enough, doing the:
expect eof
made it work. I had no Idea that it ended after sending it the password. You'd
think it would keep running until it was finished, or that's what I though at
least.
Thanks!
Quoting Andrew <afrayedknot AT thefrayedknot.armory.com>:

> > #!/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 mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
>


find ~your -name '*base* | xargs chown :us

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/




Archive powered by MHonArc 2.6.24.

Top of Page