Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f175f962b9c26d903ee032fd58811352 > files > 43

expect-examples-5.43.0-23.mga4.x86_64.rpm

#!../expect --
# rlogin-cwd - rlogin but with same directory
#
# You can extend this idea to save any arbitrary information across rlogin
# Don Libes -  Oct 17, 1991.

set prompt "(%|#|\\$) $"		;# default prompt
catch {set prompt $env(EXPECT_PROMPT)}

eval spawn rlogin $argv
set timeout 60
expect eof exit timeout {send_user "timed out\n"; exit} -re $prompt
send "cd [pwd]\r"
interact