HEX
Server: Apache
System: Linux pdx1-shared-a2-01 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: dh_mhscom (5469217)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //bin/rlogin-cwd
#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh8.6 "$0" ${1+"$@"}

package require 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