root/bin/passwd_expect.sh

Revision 11, 198 bytes (checked in by jhthorsen, 15 months ago)

Added extensions to filenames

Line 
1#/bin/sh
2
3exec expect -f "$0" ${1+"$@"}
4set password [lindex $argv 1]
5spawn passwd [lindex $argv 0]
6
7sleep 1
8
9expect "assword:"
10send "$password\r"
11
12expect "assword:"
13send "$password\r"
14
15expect eof
16
Note: See TracBrowser for help on using the browser.