Expert to chance POP password

From: Pulak Rakshit <pulakr_at_cableol.net>
Date: Fri, 11 Aug 1995 18:00:37 +0100

Hi OSF experts;

I am using expert in an attempt to change POP password
from batch file. I have written the following expert file.
then attempt to pass parameter as $1, $2, as follows:

#./passwd.exp user pass123

This comes up with several errors, interms of the
parameters are not recognised. How should I pass parameters
to passwd.exp from a shell script so $1 and $2 are recognised.

Thanks in advance

Pulak

************************************
        File called passwd.exp
************************************
#!/usr/local/bin/expect -f
spawn /usr/lib/mh/popwrd $1
expect "*password:"
send "$2\r"
expect "*password:"
send "$2\r"
expect eof
Received on Fri Aug 11 1995 - 19:14:32 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT