Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | #!/bin/sh |
2 | # \ | |
3 | exec expect -- "$0" ${1+"$@"} | |
4 | # rlogin-cwd - rlogin but with same directory | |
5 | # | |
6 | # You can extend this idea to save any arbitrary information across rlogin | |
7 | # Don Libes - Oct 17, 1991. | |
8 | ||
9 | set prompt "(%|#|\\$) $" ;# default prompt | |
10 | catch {set prompt $env(EXPECT_PROMPT)} | |
11 | ||
12 | eval spawn rlogin $argv | |
13 | set timeout 60 | |
14 | expect eof exit timeout {send_user "timed out\n"; exit} -re $prompt | |
15 | send "cd [pwd]\r" | |
16 | interact |