[ale] Question for UNIX/Linux gurus...

George A. Nies gnies at mindspring.com
Fri Jul 16 18:49:06 EDT 1999


Perhaps I'm in a wierd mood because it is Friday...
Please take the above as a warning of sickness to come.


You could add the following to your .bashrc (or .kshrc):
   alias rlogin='TERM=$TERM:$(echo ${PWD#$HOME/} | tr '/' '%') rlogin'

log out then back in.

Then on the remote machine, add this to the end of your .profile:
   NewPWD=${TERM#*:}
   TERM=${TERM%%:*}
   [ "$NewPWD" ] && cd $(echo $NewPWD | tr '%' '/')

This works for both ksh and bash


> > I am trying to set up an alias that will rlogin to a remote machine and change directory to the exact
> >
> > directory I am on on my local machine.  Anyone know how to do this in sh or ksh?  I have the
> >
> > exact same directory structure (except $HOME) on both machines.  I have looked at the man pages
> >
> > on rlogin and telnet and I dont see any way to login to a machine and execute a command all in one command
> >
> > except with rsh, which logs out afterward.
> >
> > Any help appreciated,
> >
> > Justin






More information about the Ale mailing list