From: Harter, D. <dh...@st...> - 2003-08-06 20:45:45
|
There is an example of this in the 'Exploring Expect' book, Pg 5, but I want the differences with ExpectPerl. I am a beginner with Unix, Perl, and Expect, but I am trying to cut down my development time, so wonder if someone can give me an example using ExpectPerl to set passwords using the Unix passwd command. I am a System Administrator who could really use a script to set passwords automatically. I still have to work out getting the modules installed on our system, but if I can show it can be done, it will help. Using TCL/Expect, it would be: spawn passwd [lindex $argv 0] set password [lindex $argv 1] expect "password:" send "$password\r" expect "password:" send "$password\r" expect eof How would I do it in ExpectPerl??? . |