[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Script til at udføre en kommando via telnet?



Mange tak, det var vist lige det jeg skulle bruge.


YS, Rune Madsen
sslug@sslug
http://tips.pair.com

On Mon, 31 May 1999, Erwin S. Andreasen wrote:

> On Mon, 31 May 1999, Rune Madsen wrote:
> 
> > Jeg vil gerne lave et script, som logger ind på en anden maskine, laver et
> > mysqldump, og derefter overfører dumpet til min maskine via ftp.
> > 
> > Problemet består i, hvordan man udfører en kommando på en anden maskine
> > via telnet, når det skal gøres med et script.
> 
> Skriv autoexpect. Udfoer de kommandoer du vil have. Try control-D. Du vil
> nu have et expect script som goer praecis som det du har gjort (du boer
> nok redigere i det lidt). Det kan du saa bare koere.
> 
> Expectscriptsprog virker paa den maade at den starter en applikation op i
> en pseudotty (ligesom xterm) og afventer at den skriver noget bestemt. Saa
> sender en bestemt streng, og venter igen osv. Man kan goere det mere
> kompliceret med if-checks osv, men oftest benytter man expect for at fx.
> lave et login script.
> 
> Se mere i man expect.
> 
> -- 
> ==============================================================================
> Erwin Andreasen   Herlev, Denmark <sslug@sslug>          UNIX System Programmer
> <URL:http://www.andreasen.org>              <*>         (not speaking for) DDE
> ==============================================================================
> 
> 



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *