Image 01 Image 02

Genrating expect scripts

Posted on 15th February 2007 by Taggy
0

Wanting to exectue a sequence of scripts like taking a backup of your $HOME and scp’ing it to another server ? and didnt know how to do this with a script ?

Expect does help you with this but writing expect scripts is not that easy anyway ;) .

Check out the autoexpect . Usage is as follows

autoexpect -f backup scp -r $HOME t@codelabs:/home/t/backup
Do all that you want to manually once and when u exit the shell you will have file names “backup” and u can execute it with

expect -f backup and it does it :) all by itself

[tags]expect,autoexpect[/tags]

Send post as PDF to www.pdf24.org


Leave a reply...






FireStats icon Powered by FireStats