Wednesday, May 14, 2008

interactive programming

if u want to talk to the programes in linx while there are running you can use Expect to do it.
as a example u can automate the connecting to reemote host as follows

spawn ssh username@host [starting process]
expect "passwd" [expecting till the process prompt for a password]
send "passwd/r" [sending passwd to the process]
interact [giving control to the user from the Expect program]