#!/bin/csh -f # Sneaky utility to ensure we stay in current directory when switching from # one TCM machine to another (MDT). # Setup aliases such as the following in your .cshrc file. # # alias tcm3 'dirwrite ; rlogin tcm3 -l mdt26' # # and then add the following to your .login file. # # if ( -e ~/bin/.t/t ) then # set directory = `head -1 ~/bin/.t/t` # rm ~/bin/.t/t # cd $directory # endif # if ( ! -e ~/bin/.t) mkdir ~/bin/.t if (-e ~/bin/.t/t) rm ~/bin/.t/t pwd | sed "s%`cd ${HOME}; pwd`%${HOME}%" > ~/bin/.t/t