#!/usr/bin/expect -f set env(TERM) vt100 set force_conservative 1 if {$force_conservative} { set send_slow {1 .1} proc send {ignore arg} { sleep .1 exp_send -s -- $arg } } set timeout 10 match_max 100000 spawn smbclient -L $argv expect -exact "Password:" send -- "\004" expect eof