#! /bin/sh

# Call rsh, but export environment to remote host.  Assumes that both hosts
# share the same user filesystem (as they do at UKC).
#	Martin Guy, Canterbury, October 1989

printenv | sed 's/^\([^=]*\)=\(.*\)/setenv \1 '\''\2'\'/'' > $HOME/.rshenv.$1
exec rsh "$@"

# then csh picks up .history between .cshrc and login and removes it in .login.
